FYI: Fix InetAddress.getByName and loopback issues
Andreas Tobler
toa@pop.agri.ch
Mon Aug 16 11:54:00 GMT 2004
Bryce McKinlay wrote:
> Bryce McKinlay wrote:
>
>> Passing null to InetAddress.getByName() and getAllByName should return
>> the loopback InetAddress. Its possible to do this without the normal
>> security check - passing a null argument to SecurityManager would be a
>> NullPointerException. This also cleans up the security checks -
>> lookup() does not need to do a check becuase the public methods that
>> call it will have done it already. In the getByName() case, we were
>> actually doing the check 3 times - once in getByName, once in
>> getAllByName, and then again in lookup.
>
>
>
> I also checked in some mauve tests for this.
You forgot natInetAddressPosix and Win32.
Patch attached.
Greets
Andreas
2004-08-14 Andreas Tobler <a.tobler@schweiz.ch>
* java/net/natInetAddressPosix.cc (lookup): Reflect rename of
localhostAddress to loopbackAddress.
* java/net/natInetAddressWin32.cc (lookup): Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: loopbackAddr.diff
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040816/851b8559/attachment.ksh>
More information about the Java-patches
mailing list