This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: Correction to InetAddress bug?


On Mon, 26 Jul 1999, Lincoln Spiteri wrote:

> I guess that means that all is well with Socket but not in the
> ServerSocket.
> 
>  On Mon, 26 Jul 1999, lincoln.spiteri@st.com wrote:
> > I am trying to get the host address from both a Socket and a ServerSocket as
> > follows:
> > 
> > String address = someSocket.getInetAddress().getHostAddress();
> > 
> > this always returns a null.

Hmm, the problem seems to be that the InetAddress that is instantiated 
has a null address value.  I'll have to look deeper to decide on the 
right fix (something might be relying on address being null at times,
though I hope not).

BTW, this doesn't happen with Socket because the address is being set to a 
non-null value in the InetAddress created by the accept().  I'll work up 
a patch for the problem; thanks for reporting it!
--warrenl

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