This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR 17069: fix for InetAddress.getLocalHost


Michael Koch writes:
 > Am Sonntag, 9. Januar 2005 17:12 schrieb Andrew Haley:
 > > 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.
 > 
 > SUN JDK throws an unkown host exception ?

Does it?  Oh, okay then.  

 > What IP would you use when the host is multihomed ?

The first nontrivial one, I suppose.  But never mind, the patch is OK.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]