I've not really been paying attention to the reflect stuff, and had missed
a question about it in a blog I usually read:

http://radio.weblogs.com/0112098/2002/09/24.html#a114

Rather than using:

Class theClass = Class.forName( className );

in reflect.ReflectionUtils, James suggests we should use:

****
Class theClass = null;

try {
 theClass = Thread.currentThread().getContextClassLoader().loadClass(
className );
} catch (ClassNotFoundException e) {
 theClass = getClass().getClassLoader().loadClass( className );
}
****

as "Class.forName is evil".

Any views on this??

Hen


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to