On Fri, 1 Mar 2024 17:35:35 GMT, Korov <d...@openjdk.org> wrote: > Removing unused parameter `defval` in `SocketPermission.initEphemeralPorts`, > so the variable `PRIV_PORT_MAX` and `DEF_EPH_LOW` unused too. > > Removing unused parameter `cname` in `SocketPermission.authorizedIPv4` and > `SocketPermission.authorizedIPv6`. > > Parameter 'action' must be not empty so `a.length > 0`, the check `a.length - > 1 < 0` can be removed.
Let's align declaration of `java.net.SocketPermission#NONE` field Can we drop `java.net.SocketPermission#defaultDeny` field? It seems it's always has `false` value (`setDeny` is never called) src/java.base/share/classes/java/net/SocketPermission.java line 707: > 705: } > 706: > 707: private boolean authorized(String cname, byte[] addr) { now `cname` parameter is unused in this method ------------- PR Comment: https://git.openjdk.org/jdk/pull/18086#issuecomment-1974791236 PR Comment: https://git.openjdk.org/jdk/pull/18086#issuecomment-1974791645 PR Review Comment: https://git.openjdk.org/jdk/pull/18086#discussion_r1509962901