cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/request RequestFactory.java
Date Thu, 03 Apr 2003 14:35:20 GMT
stefano@apache.org wrote:

>stefano     2003/04/03 06:16:32
>
>  Modified:    src/java/org/apache/cocoon/components/request
>                        RequestFactory.java
>  Log:
>  removing fixmes and adding explainations  
>  
>
...

>           try {
>               ClassLoader loader = Thread.currentThread().getContextClassLoader();
>               Class clazz = loader.loadClass(className);
>  -            factory = (RequestFactory)clazz.newInstance();
>  +            factory = (RequestFactory) clazz.newInstance();
>           } catch (Throwable t) {
>  -            // FIXME (VG): Is it Ok to ignore all exceptions?
>  +            // the try/catch mechanism is used because there is no way
>  +            // to know if a classloader contains a class without asking for it
>           }
>  
>
...

>           if (factory == null) {
>               factory = new SimpleRequestFactoryImpl();
>           }
>

I think my comment was more about "Is it ok to return 
SimpleRequestFactoryImpl instead of requested factory (via paramater 
className) and not even print any warning about it".

Vadim



Mime
View raw message