RFR: 8022445: fix RMISocketFactory example to avoid using localhost
Alan.Bateman at oracle.com
Thu Aug 22 13:48:29 UTC 2013
On 22/08/2013 13:48, Bernd Eckenfels wrote:
> getLoopbackAddress is either ::1 or 127.0.0.1 (depending on the stack preferemces) and InetAddress.getByName("localhost") is also one of both (but not necesarily the same, unfortunately). This happened to me in the past, so I wanted to make sure that asumption does not show up in sample code of JavaDocs. Thanks for improving this!
You're right, this method is returning a specific address. In that case,
I think Chris's point about using the familiar (IPv4) is probably the
way to go when changing this.
More information about the core-libs-dev