According to the Java Language Specification (or maybe the JVM Specification) the bootstrap classloader may be returned as null. I've seen this in action in other projects and it is quite annoying.
Bill Logan >From: Peter Donald <[EMAIL PROTECTED]> >Reply-To: "Avalon Developers List" <[EMAIL PROTECTED]> >To: "Avalon Developers List" <[EMAIL PROTECTED]> >Subject: Re: DefaultLogTargetFactoryManager >Date: Fri, 23 Nov 2001 07:35:25 +1100 > >On Fri, 23 Nov 2001 00:13, Leo Sutic wrote: > > Java API for Thread.getContextClassLoader (): > > > > "Returns the context ClassLoader for this Thread. The context >ClassLoader > > is provided by the creator of the thread for use by code running in this > > thread when loading classes and resources. > > > > If not set, the default is the ClassLoader context of the parent Thread. > > > > The context ClassLoader of the primordial thread is typically set to the > > class loader used to load the application." > > > > So that should be "never", as I understand it. Do you have any examples > > when getContextClassLoader () == null? > >oh - I thought it started out as null for some reason. Even then I have >seen >applications where it is null, and it would suck if your app started >throwing >NPEs or failing because of this. It would also suck for any applications >that >create ClassLoaders but don't set the ContextClassLoader (or set it to >another value) because they would fail. > >-- >Cheers, > >Pete > >------------------------------------------------------ > Mark Twain: "In the real world, the right thing never >happens in the right place at the right time. It is >the task of journalists and historians to rectify >this error." >------------------------------------------------------ > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>