[Patch] PR 17069: fix for InetAddress.getLocalHost

Andrew Haley aph@redhat.com
Sun Jan 9 16:13:00 GMT 2005


Michael Koch writes:
 > 
 > 
 > I wrote the attached patch to fix PR libgcj/17069. The problem was that
 > InetAddress.getLocalHost() returned an invalid InetAddress object when
 > the local hostname could not be determined (e.g. when /etc/hostname
 > doesn't exist or is not setup properly).
 > 
 > Ok to commit to trunk ?

This doesn't look right.  There's no law saying you have to set a
hostname, as far as I'm aware.  It would seem far more helpful to
return the hostname as an IP address.

Andrew.



More information about the Java-patches mailing list