harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Kleymenov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-718) [classlib][luni] Socket fails to connect to wildcard address.
Date Fri, 30 Jun 2006 10:12:29 GMT
[classlib][luni] Socket fails to connect to wildcard address.
-------------------------------------------------------------

         Key: HARMONY-718
         URL: http://issues.apache.org/jira/browse/HARMONY-718
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Alexander Kleymenov
    Priority: Minor


Harmony socket implementation can not establish connection in the case of wildcard address.
To reproduce the problem run the following test:
 
----------------------
import java.net.*;
 
public class SocketBug {
    
    public static void main(String[] args) throws Exception {
        ServerSocket ss = new ServerSocket(0);
        Socket s = new Socket();
        s.connect(new InetSocketAddress(ss.getLocalPort()));
        ss.accept();
        s.close();
        ss.close();
    }
}
----------------------
 
It fails with the following exception:
 
Exception in thread "main" java.net.ConnectException: 0.0.0.0/0.0.0.0:3909 - The address is
not available
        at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:238)
        at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:587)
        at java.net.Socket.connect(Socket.java:977)
        at java.net.Socket.connect(Socket.java:920)
        at SocketBug.main(SocketBug.java:8)
 
while on RI test silently exits.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message