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

@ -33,7 +33,6 @@ import jdk.internal.io.JdkConsoleImpl;
import jdk.internal.io.JdkConsoleProvider;
import jdk.internal.javac.PreviewFeature;
import sun.nio.cs.UTF_8;
import sun.security.action.GetPropertyAction;
/**
* Methods to access the character-based console device, if any, associated
@ -646,7 +645,7 @@ public sealed class Console implements Flushable permits ProxyingConsole {
private static final boolean istty = istty();
static final Charset CHARSET =
Charset.forName(GetPropertyAction.privilegedGetProperty("stdout.encoding"), UTF_8.INSTANCE);
Charset.forName(System.getProperty("stdout.encoding"), UTF_8.INSTANCE);
private static final Console cons = instantiateConsole();
static {
// Set up JavaIOAccess in SharedSecrets