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

Eirik Bjørsnøs eirbjo at openjdk.org
Tue Dec 3 09:56:48 UTC 2024


On Sun, 1 Dec 2024 05:50:47 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

>> 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

Thanks a lot for reviews and CI testing, much appreciated!

I'll go ahead and integrate this now.

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

PR Comment: https://git.openjdk.org/jdk/pull/22467#issuecomment-2514057506


More information about the net-dev mailing list