Bug 11330 - java.lang.ClassLoader() does not set parent classloader
Summary: java.lang.ClassLoader() does not set parent classloader
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2003-06-26 16:15 UTC by Gary Benson
Modified: 2003-09-28 20:13 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-24 12:50:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Benson 2003-06-26 16:15:34 UTC
The zero-argument constructor to java.lang.ClassLoader creates a new classloader
with the parent set to null when it should be set to the classLoader returned by
the method getSystemClassLoader().

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/ClassLoader.html#ClassLoader()
Comment 1 Andrew Pinski 2003-07-24 12:50:25 UTC
Still true on the mainline (20030724).
Comment 2 Tom Tromey 2003-09-28 20:13:09 UTC
This was fixed by the ClassLoader merge with Classpath:

2003-09-25  Tom Tromey  <tromey@redhat.com>

	* java/lang/reflect/Proxy.java (generate): Uncomment protection
	domain code.
	* java/lang/natClassLoader.cc (defineClass): Added `loader'
	argument.
	(linkClass0): Now in VMClassLoader.
	(markClassErrorState0): Likewise.
	(getSystemClassLoaderInternal): New method.
	* java/lang/natClass.cc (initializeClass): Use
	VMClassLoader::resolveClass.
	* java/lang/ClassLoader.java: New version, from Classpath.
	* java/lang/Class.java (getProtectionDomain):
	protectionDomainPermission and unknownProtectionDomain now in
	VMClassLoader.
	* java/lang/Class.h: VMClassLoader now a friend class.
	* gnu/gcj/runtime/VMClassLoader.java (instance): Now
	package-private.
	* gcj/javaprims.h: Regenerated class list.
	* resolve.cc (_Jv_PrepareClass): Use VMClassLoader::resolveClass.
	* java/lang/VMClassLoader.java: New version from Classpath;
	modified for libgcj use.