RFR: 8345074: java.net.InterfaceAddress constructor could be made private [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Sun Dec 1 05:50:47 UTC 2024


> Please review this PR which suggests to make the constructor of `java.net.InterfaceAddress` private.
> 
> This constructor is only accessed by native code via the `NetworkInterface` class. Making it private would express the intent of this class as being non-subclassable.
> 
> The comment of the constructor is updated to reflect the new access modifier as well as to make it clear that the constructor is not to be invoked from Java code and that instances are obtained from `NetworkInterface` via native code. 
> 
> Marking this class final is handled separately in JDK-8344943 via a CSR.

Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:

  Simplify cnostructor comment to just say where it is called from

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22467/files
  - new: https://git.openjdk.org/jdk/pull/22467/files/92d36d4d..0ee8aa4e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22467&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22467&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22467.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22467/head:pull/22467

PR: https://git.openjdk.org/jdk/pull/22467


More information about the net-dev mailing list