Skip to content

Commit

Permalink
WELD-2789 Remove SecurityManager usage
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed May 31, 2024
1 parent 1bbd104 commit d28ecca
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.jboss.weld.bootstrap.api.helpers;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

Expand Down Expand Up @@ -63,16 +61,7 @@ public boolean isSet(String id) {
}

private ClassLoader getClassLoader() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
});
} else {
return Thread.currentThread().getContextClassLoader();
}
return Thread.currentThread().getContextClassLoader();
}
}
}

0 comments on commit d28ecca

Please sign in to comment.