Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 54044 invoked from network); 10 Jan 2007 10:38:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2007 10:38:49 -0000 Received: (qmail 26388 invoked by uid 500); 10 Jan 2007 10:38:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 26363 invoked by uid 500); 10 Jan 2007 10:38:55 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 26354 invoked by uid 99); 10 Jan 2007 10:38:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 02:38:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 02:38:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8347B7142CC for ; Wed, 10 Jan 2007 02:38:27 -0800 (PST) Message-ID: <21102051.1168425507519.JavaMail.jira@brutus> Date: Wed, 10 Jan 2007 02:38:27 -0800 (PST) From: "Tim Ellison (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2930) [classlib][luni]java.net.Socket cann't bind the local address when constructed with proxy In-Reply-To: <3916344.1167543561097.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463520 ] Tim Ellison commented on HARMONY-2930: -------------------------------------- I just have a problem with the test case relying upon port 22323 being free, rather than binding to any available port. Given that this is a regression test can we change the assertion to be socket.getLocalAddress() != 1080 ? > [classlib][luni]java.net.Socket cann't bind the local address when constructed with proxy > ----------------------------------------------------------------------------------------- > > Key: HARMONY-2930 > URL: https://issues.apache.org/jira/browse/HARMONY-2930 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Ubuntu > Reporter: Sean Qiu > Assigned To: Tim Ellison > Attachments: patch.diff > > > 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: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira