Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 9956 invoked from network); 2 Feb 2007 17:21:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 17:21:25 -0000 Received: (qmail 24906 invoked by uid 500); 2 Feb 2007 17:21:28 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 24881 invoked by uid 500); 2 Feb 2007 17:21:28 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 24863 invoked by uid 99); 2 Feb 2007 17:21:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 09:21:28 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mloenko@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 09:21:19 -0800 Received: by nf-out-0910.google.com with SMTP id d4so1069471nfe for ; Fri, 02 Feb 2007 09:20:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GcudmL4xO/Y8coDqXHV3zaR6aLcewVdI8iDoBG5pClAx8BQPHHpWE1KQHNUfGn1+mTTiO5/ub3xeLi9YtkxR7e072Mma9rqrjnhVz+WNbskAKwltaH/yFh6jBGdvWbKz/1CjB85FBowMANHQNwUeTM4hRu0t/fR2wVRL1w6tIbI= Received: by 10.49.8.15 with SMTP id l15mr4980281nfi.1170436857485; Fri, 02 Feb 2007 09:20:57 -0800 (PST) Received: by 10.49.10.9 with HTTP; Fri, 2 Feb 2007 09:20:57 -0800 (PST) Message-ID: <906dd82e0702020920u756ca908k3426487d667a535@mail.gmail.com> Date: Fri, 2 Feb 2007 23:20:57 +0600 From: "Mikhail Loenko" To: dev@harmony.apache.org Subject: Re: [classlib][luni] "ant fetch-depends" on Harmony JDK failure In-Reply-To: <51abf0750702020846n234426ct1f95195da6b6ce4d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <906dd82e0702020158g58a2409bpde724ff1b68cd957@mail.gmail.com> <3C1D1654-809D-4AF7-B9C4-919A23ED47B8@pobox.com> <51abf0750702020846n234426ct1f95195da6b6ce4d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 2007/2/2, Mikhail Markov : > Here is the explanation: > When creating java.net.Proxy object, createProxy() method in > java.net.ProxySelectorImpl class uses InetSocketAddress.createUnresolved() > method. In this case ((InetSocketAddress) proxy.address()).getAddress() will > return null, while getHostName() and getPort() method will return correct > results. > And Socket.connect(SocketAddress, int) method uses getAddress() method. > Mikhail's fix create normal resolved InetSocketAddress which getAddress() > returns normal non-null InetAddress. > > I've checked the behaviour of Socket.connect(SocketAddress, int) on RI - it > also throws java.net.UnknownHostException in case of unresolved > SocketAddress. > And finally i've checked that Proxy objects created in RI are also contains > unresolved addresses. I've made exactly these two tests on RI when was thinking about the patch... you know this saying ;) Thanks, Mikhail L > > So, Mikhail patches the correct piece of code and his patch is correct :-). > > Regards, > Mikhail > > > > > > On 2/2/07, Geir Magnusson Jr. wrote: > > > > This patch bugs me because it seems like a bit of a hack around a > > problem elsewhere, although it could simply be because I don't know > > what I'm talking about :) > > > > Anyway, I guess my problem boils down to this : > > > > The code now is : > > > > socket.connect(proxy.address(), .... ); > > > > and the new code is (in shorthand ) : > > > > socket.connect( new InetSA(proxy.getHostName(), proxy.getPort > > ()), ....); > > > > why doesn't proxy.address() return a resolved SocketAddress - IOW, do > > the same thing as this patch is doing? > > > > geir > > > > > > On Feb 2, 2007, at 4:58 AM, Mikhail Loenko wrote: > > > > > hi > > > > > > I'm trying to build Harmony classlib on Harmony JDK (linux/ia32) > > > > > > "ant" and "ant clean" work just fine :) > > > > > > "ant -v fetch-depends" prints the following: > > > > > > java.net.ConnectException: people.apache.org/140.211.11.9:80 - > > > Connection timed > > > > > > please review my patch at > > > http://issues.apache.org/jira/browse/HARMONY-3113 > > > > > > Thanks, > > > Mikhail > > > > >