harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2930) [classlib][luni]java.net.Socket cann't bind the local address when constructed with proxy
Date Sun, 31 Dec 2006 05:39:21 GMT
[classlib][luni]java.net.Socket cann't bind the local address when constructed with proxy
-----------------------------------------------------------------------------------------

                 Key: HARMONY-2930
                 URL: http://issues.apache.org/jira/browse/HARMONY-2930
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Ubuntu
            Reporter: Sean Qiu


Test:

    public void test_SocketWithProxy() throws IOException {
        //Confiure a available proxy here
        InetSocketAddress isa = new InetSocketAddress(InetAddress.getByName("Your proxy host"),
80);

        Socket socket = new Socket(new Proxy(Proxy.Type.SOCKS, isa));

        InetAddress address = InetAddress.getByName("localhost");
        int port = 23232;

        socket.bind(new InetSocketAddress(address, port));

        assertEquals(port, socket.getLocalPort());
        assertEquals(address, socket.getLocalAddress());
    }

Result:
RI passes
Harmony fails

While constructing a new socket with proxy, in contrast with RI, Harmony will keep the address
and port zero.

-- 
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