You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/04 04:37:15 UTC
[jira] Closed: (HARMONY-946) [classlib][luni] new Socket("0.0.0.0",
1099) on Windows throws exception
[ http://issues.apache.org/jira/browse/HARMONY-946?page=all ]
Paulex Yang closed HARMONY-946.
-------------------------------
Verified by Victor.
> [classlib][luni] new Socket("0.0.0.0", 1099) on Windows throws exception
> ------------------------------------------------------------------------
>
> Key: HARMONY-946
> URL: http://issues.apache.org/jira/browse/HARMONY-946
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP, Apache Harmony DRLVM HEAD-4807 (2006-05-02), Windows/ia32/msvc 1310, debug
> Reporter: Victor Martynov
> Assigned To: Paulex Yang
> Attachments: JIRA964.diff
>
>
> 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("0.0.0.0 ", 1099);
> }
> }
> -------------------------------------------------------------------
> The output on RI and on Harmony differs:
> c:\test>java Test
> c:\test>C:/Harmony/bin/ij Test
> java.net.ConnectException: 0.0.0.0/0.0.0.0:1099 - 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:200)
> at java.net.Socket.startupSocket(Socket.java:715)
> at java.net.Socket.<init>(Socket.java:139)
> at Test.main(Test.java:7)
> Moreover the results differ on Linux and Windows:
> vamartyn@server:~> uname -a
> Linux server 2.6.5-7.145lxset1-smp #1 SMP Thu Jan 27 09:19:29 UTC 2005 i686
> i686 i386 GNU/Linux
> vamartyn@server:~> Harmony/bin/ij -version
> Apache Harmony DRLVM HEAD-4807 (2006-05-02), Linux/ia32/gcc 3.3.4, debug
> vamartyn@server:~> Harmony/bin/ij Test
> vamartyn@server:~> java Test
> vamartyn@server:~>
> The address "0.0.0.0" is a valid address to connect, so it is a bug in luni.jar and it shows itself only on windows.
--
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