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

Naoto Sato naoto at openjdk.java.net
Fri May 13 18:40:50 UTC 2022


On Fri, 13 May 2022 17:38:48 GMT, Ichiroh Takiguchi <itakiguchi at openjdk.org> wrote:

>> On JDK19 with Linux ja_JP.eucjp locale,
>> System.getenv() returns unexpected value if environment variable has Japanese EUC characters.
>> It seems this issue happens because of JEP 400.
>> Arguments for ProcessBuilder have same kind of issue.
>
> Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8285517: System.getenv() returns unexpected value if environment variable has non ASCII character

src/java.base/share/classes/jdk/internal/util/StaticProperty.java line 251:

> 249: 
> 250:     /**
> 251:      * Return the {@code sun.jnu.encoding} system property.

This can be eliminated by changing the`@return` block tag below to `{@return the {@code sun.jnu.encoding} ...}`.

src/java.base/share/classes/jdk/internal/util/StaticProperty.java line 264:

> 262: 
> 263:     /**
> 264:      * Return charset for {@code sun.jnu.encoding} system property.

Same as above. `charset` can be capitalized and changed to `{@code}`.

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

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


More information about the core-libs-dev mailing list