Details
-
Type:
Enhancement
-
Status: Closed
-
Priority:
P4
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: tbd_major
-
Component/s: security-libs
-
Subcomponent:
Description
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.
Attachments
Issue Links
- duplicates
-
JDK-6899533 SecureClassLoader and URLClassLoader have unnecessary check for createClassLoader permission
-
- Closed
-