On Sat, 16 Nov 2024 21:01:56 GMT, Eirik Bjørsnøs <eir...@openjdk.org> wrote:
> Please review this PR which cleans up SecurityManager related code from > `java.net.NetworkInterface` after JEP-486. > > The specification of four methods in NetworkInterface is updated to reflect > that these methods no longer uses `SecurityManager` to filter the results > such that a subset may be returned. A CSR draft has been filed to fix this > leftover from JEP-486. > > The actual SecurityManager cleanup: > > * The `getCheckedInetAddresses` method is removed. > * `getInetAddresses` is updated to return `enumerationFromArray(addrs)` (with > no filtering) > * `inetAddresses` is update to return `streamFromArray(addrs)` (with no > filtering) > * `getInterfaceAddresses` is updated to return the list of InterfaceAddresses > (with no filtering) > * `getHardwareAddress` is updated to return the result with no permission > checking > * Three c-style array declarations hurt my eyes and were updated (sorry!) > > GHA and tier2 results pending. src/java.base/share/classes/java/net/NetworkInterface.java line 513: > 511: * > 512: * @return a byte array containing the address, or {@code null} if > 513: * the address doesn't exist "accessed given the current privileges" relates to OS privileges/capabilities so not security manager related. So I think drop the change the method description, only change to this method should be the removal of the SM permission check. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22177#discussion_r1845304203