RFR: 8313239: InetAddress.getCanonicalHostName may return ip address if reverse lookup fails [v3]
Alan Bateman
alanb at openjdk.org
Thu Aug 3 12:26:35 UTC 2023
On Thu, 3 Aug 2023 12:19:04 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review of this change which updates the javadoc of `java.net.InetAddress.getCanonicalHostName()` method to clarify its semantics? This addresses https://bugs.openjdk.org/browse/JDK-8313239.
>>
>> This a javadoc only change and the documentation is updated to match the current implementation. A CSR will be drafted for this change.
>
> Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:
>
> - remove space char
> - update the private method javadoc too and minor line length change
src/java.base/share/classes/java/net/InetAddress.java line 791:
> 789: * {@linkplain InetAddress#getAddress() IP address} using the system-wide
> 790: * {@linkplain InetAddressResolver resolver}. This is a best effort method,
> 791: * meaning we may not be able to return the fully qualified domain name; in
I think you'll need to replace "we" with "it" here. It may also be useful to expand this sentence a bit, maybe with an example of why it may fail.
I also wonder (and I'm in two minds on this) is if this method should include an impNote to say what it actually does.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15134#discussion_r1283126500
More information about the net-dev
mailing list