[EMAIL PROTECTED] wrote:

Author: cziegeler
Date: Thu Dec 30 01:22:00 2004
New Revision: 123708

URL: http://svn.apache.org/viewcvs?view=rev&rev=123708
Log:
Remove unused classloader



<snip/>

try {
- final Class componentClass = this.loader.loadClass( info.getServiceClassName() );
+ final Class componentClass = this.getClass().getClassLoader().loadClass( info.getServiceClassName() );



Why? This seems very dangerous to me as it doesn't use the Thread's context classloader (or any other given classloader), and will cause problems if the jar containing this class is higher in the classloader tree than the loaded class. Think e.g. autocompling classloader or real blocks classloaders.


Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Reply via email to