cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pier P. Fumagalli" <p...@apache.org>
Subject Re: [C2] ClassLoader issues
Date Thu, 31 Aug 2000 21:55:14 GMT
Stefano Mazzocchi wrote:
> 
> "Pier P. Fumagalli" wrote:
> >
> > Sebastien Sahuc wrote:
> > >
> > > Hello,
> > >
> > > While debugging inside Cocoon2 with the lastest snapshot from CVS, I
> > > realized that there was some Class loader issues :
> > >
> > > in the Coccon.getClass() method, the instrcution
> > > 'this.getClass().getClassLoader().loadClaa(className)' gave me a NPE due
> > > to the fact that claa.getClassLoader() can return null (from JDK 1.2
> > > Javadoc ).
> > >
> > > So I would rather use the new (since 1.2)
> > > Thread.currentThread.getContextClassLoader() instead, since it's the
> > > container's role to set the correct ClassLoader that's been used by the
> > > servlet application.
> > >
> > > What do you think ?
> > >
> > > All the best,
> >
> > That was my first implementation... But I was shot because I was
> > breaking JDK 1.1 compatibility :) :)
> >
> > BLAH! to all those who voted -1 on using the context class loader at
> > that time :) :) :)
> 
> Yeah, but while you were not here we decided not to care about 1.1
> anymore so, I'm +1 on the change.

I've seen that... And, BTW, I believe that in post 1.1 JDKs
Class.forName() simply uses the context class loader for getting
classes...

	Pier

Mime
View raw message