8345325: SM cleanup of GetPropertyAction in java.base

Reviewed-by: alanb, lancea, naoto, mchung
This commit is contained in:
Roger Riggs 2024-12-03 14:59:30 +00:00
parent eac00f6d11
commit fcf185c8b4
11 changed files with 13 additions and 241 deletions

View file

@ -33,7 +33,6 @@ import java.util.stream.Collectors;
import jdk.internal.misc.CarrierThreadLocal;
import jdk.internal.misc.TerminatingThreadLocal;
import sun.security.action.GetPropertyAction;
/**
* This class provides thread-local variables. These variables differ from
@ -804,7 +803,7 @@ public class ThreadLocal<T> {
* a stack trace should be printed when a virtual thread sets a thread local.
*/
private static boolean traceVirtualThreadLocals() {
String propValue = GetPropertyAction.privilegedGetProperty("jdk.traceVirtualThreadLocals");
String propValue = System.getProperty("jdk.traceVirtualThreadLocals");
return (propValue != null)
&& (propValue.isEmpty() || Boolean.parseBoolean(propValue));
}