[EMAIL PROTECTED] 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




Reply via email to