aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/java
diff options
context:
space:
mode:
authorbchristi <unknown>2016-10-07 12:01:24 -0700
committerbell-sw <liberica@bell-sw.com>2019-10-24 17:19:41 +0300
commitafb3ef215b1bf4814a066954d0ec34d4c22b4a72 (patch)
tree51cf810ab56c1cb1dc6051681959a00b29ef7ffb /src/share/classes/java
parent9dcafafe948f5cd63429dd93a90ea3c401c1a62f (diff)
downloadjdk8u_jdk-afb3ef215b1bf4814a066954d0ec34d4c22b4a72.tar.gz
8151486: Class.forName causes memory leak
Summary: Remove ClassLoader.domains Reviewed-by: coleenp, dholmes, mchung, naoto
Diffstat (limited to 'src/share/classes/java')
-rw-r--r--src/share/classes/java/lang/ClassLoader.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/share/classes/java/lang/ClassLoader.java b/src/share/classes/java/lang/ClassLoader.java
index 842af56143..2e98092f63 100644
--- a/src/share/classes/java/lang/ClassLoader.java
+++ b/src/share/classes/java/lang/ClassLoader.java
@@ -255,9 +255,6 @@ public abstract class ClassLoader {
new ProtectionDomain(new CodeSource(null, (Certificate[]) null),
null, this, null);
- // The initiating protection domains for all classes loaded by this loader
- private final Set<ProtectionDomain> domains;
-
// Invoked by the VM to record every loaded class with this loader.
void addClass(Class<?> c) {
classes.addElement(c);
@@ -281,14 +278,11 @@ public abstract class ClassLoader {
if (ParallelLoaders.isRegistered(this.getClass())) {
parallelLockMap = new ConcurrentHashMap<>();
package2certs = new ConcurrentHashMap<>();
- domains =
- Collections.synchronizedSet(new HashSet<ProtectionDomain>());
assertionLock = new Object();
} else {
// no finer-grained lock; lock on the classloader instance
parallelLockMap = null;
package2certs = new Hashtable<>();
- domains = new HashSet<>();
assertionLock = this;
}
}
@@ -505,7 +499,6 @@ public abstract class ClassLoader {
}, new AccessControlContext(new ProtectionDomain[] {pd}));
}
}
- domains.add(pd);
}
/**