Hi,

There was a bootstrap / system class loader confusion bug in Proxy. I
committed the attached patch to fix it.

Regards,
Jeroen

2005-10-21  Jeroen Frijters  <[EMAIL PROTECTED]>

        * java/lang/reflect/Proxy.java
        (ProxyType.ProxyType): Don't replace null with system class
loader.
        (ProxyType.hashCode): Handle null loader.
Index: java/lang/reflect/Proxy.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/reflect/Proxy.java,v
retrieving revision 1.24
diff -u -r1.24 Proxy.java
--- java/lang/reflect/Proxy.java        26 Sep 2005 18:44:38 -0000      1.24
+++ java/lang/reflect/Proxy.java        21 Oct 2005 00:03:52 -0000
@@ -413,8 +413,6 @@
      */
     ProxyType(ClassLoader loader, Class[] interfaces)
     {
-      if (loader == null)
-         loader = ClassLoader.getSystemClassLoader();
       this.loader = loader;
       this.interfaces = interfaces;
     }
@@ -426,8 +424,7 @@
      */
     public int hashCode()
     {
-      //loader is always not null
-      int hash = loader.hashCode();
+      int hash = loader == null ? 0 : loader.hashCode();
       for (int i = 0; i < interfaces.length; i++)
         hash = hash * 31 + interfaces[i].hashCode();
       return hash;
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to