harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r893709 - /harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java
Date Thu, 24 Dec 2009 08:39:49 GMT
Author: tonywu
Date: Thu Dec 24 08:39:49 2009
New Revision: 893709

URL: http://svn.apache.org/viewvc?rev=893709&view=rev
Log:
Apply patch for HARMONY-6407 [java6][classlib]NetworkInterface constructor different from
trunk, will throw NPE if network interface has no address

Modified:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java?rev=893709&r1=893708&r2=893709&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/net/NetworkInterface.java
Thu Dec 24 08:39:49 2009
@@ -88,8 +88,11 @@
         this.name = name;
         this.displayName = displayName;
         this.interfaceIndex = interfaceIndex;
-        for (int i = 0; i < addresses.length; i++) {
-            this.addresses.add(addresses[i]);
+   
+        if(addresses != null){
+            for (int i = 0; i < addresses.length; i++) {
+                this.addresses.add(addresses[i]);
+            }
         }
     }
 



Mime
View raw message