On Wed, 16 Nov 2022 15:03:37 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Weibing Xiao has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   the change according to review comment
>
> src/java.base/share/classes/jdk/internal/util/SystemProps.java line 70:
> 
>> 68:         HashMap<String, String> props = raw.cmdProperties();
>> 69: 
>> 70:         customTmpdir = props.get("java.io.tmpdir");
> 
> Move the assignment to line 98:
> 
> `customTmpdir = putIfAbsent(props, "java.io.tmpdir", 
> raw.propDefault(Raw._java_io_tmpdir_NDX));`
> 
> It will return null if the property is not already set and save a little bit.
> If it is set, it will return the custom directory.

I retract this suggestion, the `putIfAbsent` method does not return a value.
Moving the assignment to before line 113, would keep the references to 
java.io.tmpdir together.

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

PR: https://git.openjdk.org/jdk/pull/11174

Reply via email to