classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A query on the classloader architecture


From: Archie Cobbs
Subject: Re: A query on the classloader architecture
Date: Fri, 9 Jul 2004 11:59:51 -0500 (CDT)

Jeroen Frijters wrote:
> No, originally you 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?
> 
> I responded to this by saying that these vague spec statements don't
> really help, in practice you have to be compatible with Sun's
> implementation. Yes, it's legal to return null from getClassLoader
> (IMHO, even for "application" classes), but in reality this breaks lots
> of code. Yes, it's legal not to return null for "system" classes (e.g.
> java.lang.Object), but again, I'm sure this will break some code.

OK, so we both agree that Sun's implementation sometimes returns null.

What I'm curious about is: what are those cases that trigger the buggy
software's bugs? Can you be more specific? I'm just trying to understand
exactly what the issue is. What's a short program that behaves differently
on two VMs? Etc.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]