RFR: 8344855: Remove calls to SecurityManager and doPrivileged in HTTP related implementation classes in the sun.net and sun.net.www.http packages after JEP 486 integration

Daniel Fuchs dfuchs at openjdk.org
Fri Nov 22 14:57:19 UTC 2024


On Fri, 22 Nov 2024 13:15:27 GMT, Volkan Yazıcı <duke at openjdk.org> wrote:

>> Some further cleaning in the legacy HTTP implementation. 
>> Usual removal of doPrivileged, GetPropertyAction, checkPermission, etc...
>> 
>> I also took the opportunity to also remove some constructors that were never called in the legacy HttpClient, and to fix some throws signatures.
>
> src/java.base/share/classes/sun/net/NetProperties.java line 43:
> 
>> 41:     private static Properties props = new Properties();
>> 42:     static {
>> 43:         loadDefaultProperties();
> 
> Just an idea: `props = loadDefaultProperties()`, so the method doesn't need to mutate a global variable.

Good idea.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22321#discussion_r1854038150


More information about the net-dev mailing list