Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 395 invoked from network); 6 Jun 2006 10:06:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jun 2006 10:06:29 -0000 Received: (qmail 69446 invoked by uid 500); 6 Jun 2006 10:06:25 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 69409 invoked by uid 500); 6 Jun 2006 10:06:24 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 69398 invoked by uid 99); 6 Jun 2006 10:06:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2006 03:06:24 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mloenko@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2006 03:06:21 -0700 Received: by ug-out-1314.google.com with SMTP id q2so1750341uge for ; Tue, 06 Jun 2006 03:06:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DqeGTREZYGKZySz3QZwQRs0tsalCaSBTm04CDMTRXYzY0zhEqwVxG9EC0LW21/YaG2+KIcLnZVcLfkL1x/yknL8CK04BCB/FBWgS15eUle9G1+RXWoqF2qlswoKGeKUOW0XD8iHSoy2Lpvu7kmAXbLqFxnJU5zCwMBhmWfiHC0Q= Received: by 10.67.30.6 with SMTP id h6mr4313710ugj; Tue, 06 Jun 2006 03:06:00 -0700 (PDT) Received: by 10.67.25.13 with HTTP; Tue, 6 Jun 2006 03:06:00 -0700 (PDT) Message-ID: <906dd82e0606060306p5f548bd2lcf3a1e0f3771b6d@mail.gmail.com> Date: Tue, 6 Jun 2006 17:06:00 +0700 From: "Mikhail Loenko" To: harmony-dev@incubator.apache.org Subject: RE: svn commit: r412049 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi George Do you have a test that failed? It would be nice to add a regression test... Thanks, Mikhail >-----Original Message----- >To: harmony-commits@incubator.apache.org >Subject: svn commit: r412049 - >/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.jav >a > >Author: gharley >Date: Tue Jun 6 01:51:43 2006 >New Revision: 412049 > >URL: http://svn.apache.org/viewvc?rev=412049&view=rev >Log: >Fixing NPE problem introduced in HARMONY-500 when machine has more than one network interface. > >Modified: > >incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java > >Modified: >incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java >URL: >http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/j >ava/net/NetworkInterface.java?rev=412049&r1=412048&r2=412049&view=diff >============================================================================== >--- >incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java >(original) >+++ >incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java >Tue Jun 6 01:51:43 2006 >@@ -298,15 +298,19 @@ > } > > for (NetworkInterface netif : interfaces) { >- for (InetAddress addr : netif.addresses) { >- if (16 == addr.ipaddress.length) { >- if (addr.isLinkLocalAddress() || addr.isSiteLocalAddress()) { >- ((Inet6Address) addr).scopedIf = netif; >- ((Inet6Address) addr).ifname = netif.name; >- ((Inet6Address) addr).scope_ifname_set = true; >+ // Ensure that current NetworkInterface is bound to at least >+ // one InetAddress before processing >+ if (netif.addresses != null) { >+ for (InetAddress addr : netif.addresses) { >+ if (16 == addr.ipaddress.length) { >+ if (addr.isLinkLocalAddress() || addr.isSiteLocalAddress()) { >+ ((Inet6Address) addr).scopedIf = netif; >+ ((Inet6Address) addr).ifname = netif.name; >+ ((Inet6Address) addr).scope_ifname_set = true; >+ } > } > } >- } >+ }// end if > } > > return (new Vector(Arrays.asList(interfaces))) --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org