RFR: JDK-8058932 - java/net/InetAddress/IPv4Formats.java failed because hello.foo.bar does exist

Mark Sheppard mark.sheppard at oracle.com
Tue Sep 30 16:36:18 UTC 2014


thanks Daniel Alan

it was actually the domain foo.bar that proved to be a TLD for some 
reason and  resolved
to the special address 127.0.53.53, indicating a DNS problem.

so we could use your strategy on the domain part of the pseudo FQDN, and 
a bit like
New York New York, we pseudo random name it twice ?

  {"x-" + UUID.randomUUID().toString() + "-x.x-" + 
UUID.randomUUID().toString() + "-x", null},

regards
Mark

On 30/09/2014 16:47, Daniel Fuchs wrote:
> On 30/09/14 17:31, Alan Bateman wrote:
>> On 30/09/2014 08:21, Mark Sheppard wrote:
>>> Hi
>>>
>>> Please oblige and review the following small change to test
>>> test/java/net/InetAddress/IPv4Formats.java
>>>
>>> --- a/test/java/net/InetAddress/IPv4Formats.java        Tue Sep 30
>>> 13:25:04 2014 +0100
>>> +++ b/test/java/net/InetAddress/IPv4Formats.java        Tue Sep 30
>>> 15:11:05 2014 +0100
>>> @@ -36,7 +36,7 @@
>>>              {"126.1", "126.0.0.1"},
>>>              {"128.50.65534", "128.50.255.254"},
>>>              {"192.168.1.2", "192.168.1.2"},
>>> -            {"hello.foo.bar", null},
>>> +            {"somehost.some-domain", null},
>>>              {"1024.1.2.3", null},
>>>              {"128.14.66000", null }
>> This looks okay to me, at least until somehost.some-domain starts to be
>> resolved to some address :-)
>
> I wonder: would something like
>
>   "x-" + UUID.randomUUID().toString() + "-x.some-domain"
>
> result in a syntactically valid address? If so it might
> reduce the chances of collision...
>
> best regards,
>
> -- daniel
>
>>
>> -Alan
>



More information about the net-dev mailing list