-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
The subclasses of ClassLoader (SecureClassLoader, URLClassLoader) perform a redundant "createClassLoader" permission check:
protected SecureClassLoader() {
super();
// this is to make the stack depth consistent with 1.1
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkCreateClassLoader();
}
initialized = true;
}
ClassLoader() already performs the check, so SecureClassLoader does 1 xtra check, and URLClassLoader does 2.
protected SecureClassLoader() {
super();
// this is to make the stack depth consistent with 1.1
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkCreateClassLoader();
}
initialized = true;
}
ClassLoader() already performs the check, so SecureClassLoader does 1 xtra check, and URLClassLoader does 2.
- duplicates
-
JDK-6899533 SecureClassLoader and URLClassLoader have unnecessary check for createClassLoader permission
- Closed