diff options
author | Jeroen Frijters <jeroen@sumatra.nl> | 2005-10-21 00:30:25 +0000 |
---|---|---|
committer | Jeroen Frijters <jeroen@sumatra.nl> | 2005-10-21 00:30:25 +0000 |
commit | 3ee9cee7b1f514ad2de10fff726a6f4b7f68af23 (patch) | |
tree | 4dcc7fcdaa445bb2a04951a9c46c095819aa9a14 /java | |
parent | f4468b7b335a5f9ab797de3e852c8d79cda17367 (diff) | |
download | classpath-3ee9cee7b1f514ad2de10fff726a6f4b7f68af23.tar.gz |
2005-10-21 Jeroen Frijters <jeroen@frijters.net>
* java/lang/reflect/Proxy.java
(ProxyType.ProxyType): Don't replace null with system class loader.
(ProxyType.hashCode): Handle null loader.
Diffstat (limited to 'java')
-rw-r--r-- | java/lang/reflect/Proxy.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/java/lang/reflect/Proxy.java b/java/lang/reflect/Proxy.java index 325f79375..137cb5a48 100644 --- a/java/lang/reflect/Proxy.java +++ b/java/lang/reflect/Proxy.java @@ -413,8 +413,6 @@ public class Proxy implements Serializable */ ProxyType(ClassLoader loader, Class[] interfaces) { - if (loader == null) - loader = ClassLoader.getSystemClassLoader(); this.loader = loader; this.interfaces = interfaces; } @@ -426,8 +424,7 @@ public class Proxy implements Serializable */ 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; |