harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor A Martynov" <victor.marty...@gmail.com>
Subject [classlib] Uncertain behavior of new Socket("", 1099);
Date Thu, 20 Jul 2006 11:34:58 GMT

 I'm having trouble with an application. This problem concerns creating
java.net.Socket on host "".

The test below illustrates this problem:

 import java.net.*;

public class Test {

            public static void main(String args[]) throws Throwable {

                        ServerSocket ss = new ServerSocket(1099);

                        Socket s = new Socket("", 1099);



 The output on RI and on Harmony differs:

c:\test>java Test

c:\test>C:/Harmony/bin/ij Test

java.net.ConnectException: - The address is not

        at org.apache.harmony.luni.net.PlainSocketImpl.connect(

        at org.apache.harmony.luni.net.PlainSocketImpl.connect(

        at java.net.Socket.startupSocket(Socket.java:715)

        at java.net.Socket.<init>(Socket.java:139)

        at Test.main(Test.java:7)

I wonder whether it is a bug in RI or a bug in LUNI of Harmony?

Warm Regards,

Victor Martynov,
Intel Middleware Product Division

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message