From 1c4b56955af43cd9bd93a22437401f0879586ad7 Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Fri, 31 May 2024 15:13:14 +0200 Subject: [PATCH] WELD-2789 Remove SecurityManager usage --- .../api/helpers/TCCLSingletonProvider.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java index 3810f031..e4a1b88f 100644 --- a/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java +++ b/weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/TCCLSingletonProvider.java @@ -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; @@ -63,16 +61,7 @@ public boolean isSet(String id) { } private ClassLoader getClassLoader() { - SecurityManager sm = System.getSecurityManager(); - if (sm != null) { - return AccessController.doPrivileged(new PrivilegedAction() { - public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); - } - }); - } else { - return Thread.currentThread().getContextClassLoader(); - } + return Thread.currentThread().getContextClassLoader(); } } }