This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: NetworkInterface.getInetAddresses() fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 24 Aug 2006 12:13:56 -0600
- Subject: Re: FYI: NetworkInterface.getInetAddresses() fix
- References: <20060824143034.GB3867@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
Gary> This commit makes NetworkInterface.getInetAddresses() bracket IPv6
Gary> addresses before calling SecurityManager.checkConnect() with them.
Gary> This fixes http://gcc.gnu.org/ml/java/2006-08/msg00082.html.
I'm curious about one aspect of this patch...
Gary> + String hostAddress = addr.getHostAddress();
Gary> + if (addr instanceof Inet6Address)
Gary> + hostAddress = "[" + hostAddress + "]";
This is un-OO-like, which raises a warning flag for me.
I was wondering whether the brackets ought to be added in
Inet6Address.getHostAddress... ?
Tom