RFR: 8315767: InetAddress: constructing objects from BSD literal addresses [v9]

Alan Bateman alanb at openjdk.org
Sun May 19 14:32:10 UTC 2024


On Fri, 17 May 2024 10:42:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Sergey Chernyshev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/java.base/share/classes/java/net/Inet4Address.java
>>   
>>   Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>
> I read through the API docs in the latest revision (664fccb1) and it looks very good. The new method is not easily discovered, which is okay as it's very much a method for experts, I see wonder if we should put a `@see` in InetAddress.ofLiteral.

> Thanks @AlanBateman for your note. There's a link to `ofPosixLiteral` from the class level doc. I didn't want to touch `ofLiteral` as it already has the link to the #format subtitle in the class doc

I think you may have mis-read my comment. I think we need to add `@see InetAddress4#ofPosixLiteral(String)` to InetAddress.ofLiteral, not Inet4Address.ofLiteral. The reason is that methods defined by Inet4Address are not very discoverable and there is no reference to ofPosixLiteral in InetAddress's class description or anywhere else.

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

PR Comment: https://git.openjdk.org/jdk/pull/18493#issuecomment-2119257287


More information about the net-dev mailing list