RFR: 8313239: InetAddress.getCanonicalHostName may return ip address if reverse lookup fails [v2]

Jaikiran Pai jpai at openjdk.org
Thu Aug 3 12:14:08 UTC 2023


On Thu, 3 Aug 2023 11:38:52 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Daniel's review suggestion
>>   
>>   Co-authored-by: Daniel Fuchs <67001856+dfuch at users.noreply.github.com>
>
> src/java.base/share/classes/java/net/InetAddress.java line 806:
> 
>> 804:      *          of the IP address if either the operation is not allowed by the security check
>> 805:      *          or the system-wide resolver wasn't able to determine the fully qualified domain
>> 806:      *          name for the IP address.
> 
> Re-reading this, I wonder if a better wording would be:
> 
> Suggestion:
> 
>      * @return  the fully qualified domain name for this IP address. 
>      *          If either the operation is not allowed by the security check
>      *          or the system-wide resolver wasn't able to determine the fully qualified domain
>      *          name for the IP address, the textual representation of the IP address is returned instead.
> 
> 
> Just a suggestion.

The suggested change sounds fine to me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15134#discussion_r1283110669


More information about the net-dev mailing list