RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v4]

Naoto Sato naoto at openjdk.java.net
Thu May 5 15:45:19 UTC 2022


On Thu, 5 May 2022 08:08:29 GMT, Ichiroh Takiguchi <itakiguchi at openjdk.org> wrote:

>> src/java.base/unix/classes/java/lang/ProcessEnvironment.java line 73:
>> 
>>> 71:         @SuppressWarnings("removal")
>>> 72:         String jnuEncoding = AccessController.doPrivileged((PrivilegedAction<String>) ()
>>> 73:             -> System.getProperty("sun.jnu.encoding"));
>> 
>> No need to issue `doPrivileged()`, which is deprecated
>
> Hello @naotoj .
> If I just use `System.getProperty("sun.jnu.encoding")`, following testcases were failed.
> 
> java/lang/ProcessBuilder/SecurityManagerClinit.java 
> java/lang/ProcessHandle/PermissionTest.java 
> 
> Please give me your suggestion again.

Ah, OK. Never mind.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8378


More information about the core-libs-dev mailing list