On Tue, 26 Nov 2024 00:31:24 GMT, Aleksei Efimov <aefi...@openjdk.org> wrote:
> This PR removes calls to and mentions of the `SecurityManager` and the > `doPrivileged` from the `java.net.InetAddress` and > `sun.net.util.IPAddressUtil` and related classes. > > Noteworthy changes: > - the default value (`30s`) of the `networkaddress.cache.ttl` security > property responsible for successfull address lookups kept unchanged, the > mention of SM removed from the property description in the > `net-properties.html` file. > - connect permission checks are removed from the `InetAddress`, and relevant > classes, like `SocketPermission`. `SocketPermission.initEphemeralPorts` was > also modified to remove `doPrivileged`. > - `RuntimePermission("inetAddressResolverProvider")` permission has been > removed from the system-wide `InetAddressResolver` initialization code. > > `tier1` to `tier3` tests show no relevant failures. Good cleanup, good to see "check" parameter go away. src/java.base/share/classes/java/net/InetAddress.java line 1596: > 1594: */ > 1595: static InetAddress[] getAllByName0(String host) > 1596: throws UnknownHostException { Maybe move the throws UHE to the previous line while you are here. I assume it got pushed to a new line because of the check param. src/java.base/share/classes/sun/net/InetAddressCachePolicy.java line 128: > 126: try { > 127: String tmpString = Security.getProperty( > 128: cachePolicyProp); No need to split this line now, same thing with the fallback property. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/22376#pullrequestreview-2460768201 PR Review Comment: https://git.openjdk.org/jdk/pull/22376#discussion_r1858052319 PR Review Comment: https://git.openjdk.org/jdk/pull/22376#discussion_r1858044290