Jijun Wang wrote:
Hello:

1) trinidad-impl\src\main\java\org\apache\myfaces\trinidadinternal\util\JavaIntrospector.java contains 2 classes: JavaIntrospector and GenericBeanInfo(which claims to be package private). Should they be in separate file?
No. This class was written before inner classes existed. GenericBeanInfo should be a private static inner class, which implemantation-wise is essentially the same thing, but clearer.

2) In org.apache.myfaces.trinidadinternal.ui.ClassRendererInstantiator.instantiate():
...
catch (ClassNotFoundException cnfe)
   {
     _showInstantiationError(cnfe);
     throw new UndeclaredThrowableException( cnfe,
        "Instantiation of UIX Components Renderer failed, class " +
        _className + " not found.");
   }
...
Parameters for the exception looks like reversed. There is only (String, Throwable) but no (Throwable, String)
   /**
    * Constructs an <code>UndeclaredThrowableException</code> with the
    * specified <code>Throwable</code> and a detail message.
    *
    * @param    undeclaredThrowable the undeclared checked exception
    *        that was thrown
    * @param    s the detail message
    */
   public UndeclaredThrowableException(Throwable undeclaredThrowable,
                   String s)

The code wouldn't have compiled if there wasn't an appropriate constructor.

-- Blake Sullivan


Could anyone who is familiar with the code tell me if these two need to be fixed? Thanks.

Reply via email to