Patch: java.net.InetAddress

Michael Koch konqueror@gmx.de
Sat Nov 29 10:28:00 GMT 2003


On Fri, Nov 28, 2003 at 05:37:09PM -0500, Jeff Sturm wrote:
> On Fri, 28 Nov 2003, Michael Koch wrote:
> > Yes I have it compared to SUNs JDK 1.4.2.
> 
> On what OS?  I'm looking at 1.4.1 on RHL 9.

Debian GNU/Linux 3.0 Woody + some packages from testing.

> > Before the patch libgcj blocked for some seconds and then returned
> > "0.0.0.0". With this patch applied it returns imidiately.
> 
> How did you test "offline" behavior?  I tried two things: removing the
> network card from my laptop, and configuring for a non-existent nameserver
> "10.0.0.1".  In both cases my test program behaved the same whether
> compiled with gcj or running under JDK 1.4.1.

I tested by unplugging the network cable. I know this leaves a
misconfigured system ...

> This is the program I tested with:
> 
> import java.net.*;
> 
> public class IA {
>   public static void main(String[] args) throws Exception {
>       System.out.println(InetAddress.getByName("0.0.0.0").getHostName());
>   }
> }
> 
> > Now libgcj behaves the same as SUNs JDK 1.4.2.
> 
> I'm questioning though if you've found the root of the implementation
> difference.

my test is:


import java.net.InetSocketAddress;

public class T
{
  public static void main(String[] args) throws exception
  {
    InetSocketAddress addr = new InetSocketAddress(0);
  }
}

and all Mauve tests.



Michael



More information about the Java-patches mailing list