RFR: 8345223: Remove stray doPrivileged in java.base java.net and sun.net classes after JEP 486 integration [v2]

Michael McMahon michaelm at openjdk.org
Fri Nov 29 10:09:39 UTC 2024


On Fri, 29 Nov 2024 08:41:06 GMT, Volkan Yazıcı <duke at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update Copyright Years
>
> src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java line 87:
> 
>> 85:         defaultDomain = props.getProperty("http.auth.ntlm.domain", "");
>> 86:         String ntlmCacheProp = props.getProperty("jdk.ntlm.cache", "true");
>> 87:         ntlmCache = Boolean.parseBoolean(ntlmCacheProp);
> 
> Can't these simply be replaced with `System.getProperty()`? (There are more usages of `privilegedGetProperties()` in this file, FYI.)

Well spotted!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22447#discussion_r1863276807


More information about the net-dev mailing list