David Holmes wrote:
> > Archie Cobbs wrote:
> > The Sun API spec clearly states that Class.getClassLoader() 
> may return
> > null, and in fact MUST return null for primitive type Class objects.
> > So why worry about obviously buggy software?
> 
> There are only two cases where getClassLoader is allowed to 
> return null:
> 
> a) it may return null for a bootstrap loader so represented; and
> b) it must return null when invoked in the Class object for a 
> primitive type
> or void.
> 
> Consequently application code should have every right to assert that
> "this.getClass().getClassLoader()" is never null.

Sure, but, IMHO, if you write a library you cannot assume that your
library won't be loaded by the bootstrap class loader.

Regards,
Jeroen


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to