[RFR]: 8220575: Replace hardcoded 127.0.0.1 in URLs with new URI builder

Arthur Eubanks aeubanks at google.com
Tue Mar 26 22:07:17 UTC 2019


Forgot to add URIBuilder, fixed in:
http://cr.openjdk.java.net/~aeubanks/8220575/webrev.03/index.html

On Tue, Mar 26, 2019 at 12:06 PM Arthur Eubanks <aeubanks at google.com> wrote:

> > I was considering adding a buildURL() to URIBuilder since so many of
>> > these URIs end up getting converted to a URL in the end. Not sure if
>> > that's a good idea or not.
>>
>> Your call. If you do then maybe we should be considering adding:
>>
>>     public URIBuilder loopback() {
>>        return host(InetAddress.getLoopbackAddress().getHostAddress());
>>     }
>>
>> and I can't say I like URIBuilder::buildURL much - maybe
>> URIBuilder::toURL would be a better name in that case?
>>
>> I've added `loopback()` and `toURL()`/`toURLUnchecked()` and used those
> in the tests:
> http://cr.openjdk.java.net/~aeubanks/8220575/webrev.02/index.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190326/a4ce539d/attachment.html>


More information about the net-dev mailing list