RFR: 8345074: java.net.InterfaceAddress constructor could be made private [v2]
Jaikiran Pai
jpai at openjdk.org
Mon Dec 2 04:30:37 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
This looks OK to me. I'll run our CI tests against this change, so please wait to see how that goes before integrating.
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22467#pullrequestreview-2471719558
More information about the net-dev
mailing list