[PATCH] JDK-8201545 Clarify the return value of InetAddress.getByName/getAllName for empty host value
Jaikiran Pai
jai.forums2013 at gmail.com
Mon Apr 23 14:03:20 UTC 2018
Thank you Chris.
-Jaikiran
On 23/04/18 5:03 PM, Chris Hegarty wrote:
> Thanks Jaikiran,
>
> I think your patch looks good. I filed the following CSR to track
> the Java SE API ( javadoc ) change.
>
> https://bugs.openjdk.java.net/browse/JDK-8202139
>
> Once approved, I can sponsor this for you.
>
> -Chris.
>
> On 20/04/18 11:08, Jaikiran Pai wrote:
>> Hi,
>>
>> The attached patch addresses the issue noted in [1], by updating the
>> javadoc of InetAddress.getByName and InetAddress.getAllByName to
>> clarify that these methods return a loopback address, if the host
>> parameter is an empty string (same behaviour as host == null). The
>> patch also updates an existing test case to test these methods for
>> both null and empty parameter values.
>>
>> After looking at existing tests for InetAddress, I felt the existing
>> GetLoopbackAddress.java test case is closest to what we are testing
>> here. One thing I need input on, for the GetLoopbackAddress.java test
>> class, is the value of @summary. Should I update it to include a
>> summary of this new test too, or should I remove it altogether? I
>> have anyway updated the @bug to include the JIRA id of this issue. I
>> am open to creating a fresh new test case class just for this issue,
>> if that's better.
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8201545
>>
>> -Jaikiran
>>
More information about the net-dev
mailing list