incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Sullivan <blake.sulli...@oracle.com>
Subject Re: 2 places that might need fix
Date Fri, 11 May 2007 17:39:10 GMT
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.


Mime
View raw message