8344659: Some uses of GetPropertyAction were not removed from java.io and java.nio

Reviewed-by: lancea, rriggs, iris, dfuchs
This commit is contained in:
Brian Burkhalter 2024-11-21 16:18:16 +00:00
parent aaf3df7bb8
commit 87be63f85d
9 changed files with 17 additions and 25 deletions

View file

@ -36,7 +36,6 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.locks.LockSupport;
import java.util.function.BooleanSupplier;
import jdk.internal.misc.InnocuousThread;
import sun.security.action.GetPropertyAction;
/**
* Polls file descriptors. Virtual threads invoke the poll method to park
@ -305,7 +304,7 @@ public abstract class Poller {
Pollers() throws IOException {
PollerProvider provider = PollerProvider.provider();
Poller.Mode mode;
String s = GetPropertyAction.privilegedGetProperty("jdk.pollerMode");
String s = System.getProperty("jdk.pollerMode");
if (s != null) {
if (s.equalsIgnoreCase(Mode.SYSTEM_THREADS.name()) || s.equals("1")) {
mode = Mode.SYSTEM_THREADS;
@ -418,7 +417,7 @@ public abstract class Poller {
* is not a power of 2.
*/
private static int pollerCount(String propName, int defaultCount) {
String s = GetPropertyAction.privilegedGetProperty(propName);
String s = System.getProperty(propName);
int count = (s != null) ? Integer.parseInt(s) : defaultCount;
// check power of 2