Thread.setContextClassLoader creates an unnecessary RuntimePermission object each
time it is called when a SecurityManager is enabled:
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new RuntimePermission("setContextClassLoader"));
}
This is unnecessary, a singleton should be used instead like the objects
in sun.security.util.SecurityConstants, ex:
public static final RuntimePermission SET_CONTEXT_CLASSLOADER_PERMISSION =
new RuntimePermission("setContextClassLoader");