cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: svn commit: r123708 - in cocoon/trunk/src: core/java/org/apache/cocoon/core/container core/test/org/apache/cocoon/core/container java/org/apache/cocoon java/org/apache/cocoon/components/container java/org/apache/cocoon/components/treeprocessor/sitemap samples/org/apache/cocoon/samples/parentcm
Date Thu, 30 Dec 2004 10:02:02 GMT
cziegeler@apache.org 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 }


Mime
View raw message