RFR: 8351740: Clean up some code around initialization of encoding properties [v2]

Stuart Marks smarks at openjdk.org
Thu Apr 10 18:14:52 UTC 2025


On Thu, 10 Apr 2025 08:31:40 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Stuart Marks has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix comment from file.encoding to native.encoding
>
> src/java.base/share/classes/jdk/internal/util/SystemProps.java line 79:
> 
>> 77:         // Platform defined encodings cannot be overridden on the command line
>> 78:         put(props, "sun.jnu.encoding", raw.propDefault(Raw._sun_jnu_encoding_NDX));
>> 79:         var nativeEncoding = raw.propDefault(Raw._native_encoding_NDX);
> 
> I'd prefer not see "var" here, only because it's not immediately clear that nativeEncoding is a String.

I changed this `var` to `String` and also another occurrence a few lines below.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24463#discussion_r2037992031


More information about the core-libs-dev mailing list