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

Arthur Eubanks aeubanks at google.com
Tue Mar 26 19:06:47 UTC 2019


>
> > 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/454b5c9e/attachment.html>


More information about the net-dev mailing list