Correction to InetAddress bug?
Warren Levy
warrenl@cygnus.com
Mon Jul 26 18:05:00 GMT 1999
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
More information about the Java
mailing list