classpath
[Top][All Lists]
Advanced

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

RE: A few small fixes


From: David Holmes
Subject: RE: A few small fixes
Date: Fri, 6 Jun 2003 09:25:54 +1000

Jeroen Frijters wrote:
>
> * java/lang/Class.java
> (forName(String,boolean,ClassLoader)): call
> ClassLoader.loadClass(String) instead of
> ClassLoader.loadClass(String,
> boolean). There are ClassLoader subclasses out there that override
> loadClass(String) instead of loadClass(String, boolean).

I agree a change is needed but a different change. The current 0.05
code confuses initialization with resolving/linking. Class.forName
must link/resolve the class before it can return the Class object -
but it need not initialize the class depending on the initialize
parameter. The existing code passes the initialize parameter as the
resolve parameter to ClassLoader.loadClass and that is wrong. The
Class.forName method must invoke loadClass(x, true) to ensure the
class is resolved.

Regards,
David Holmes





reply via email to

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