harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r373826 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java
Date Tue, 31 Jan 2006 14:50:25 GMT
Author: tellison
Date: Tue Jan 31 06:50:21 2006
New Revision: 373826

URL: http://svn.apache.org/viewcvs?rev=373826&view=rev
Log:
getInetAddresses() should not return null

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/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/NetworkInterface.java?rev=373826&r1=373825&r2=373826&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 Jan 31 06:50:21 2006
@@ -125,10 +125,10 @@
 		// generated set the initial capacity to be the number of addresses for
 		// the network interface which is the maximum required size
 
-		// just return null if there are not addresses associated with the
+		// return an empty enumeration if there are no addresses associated with the
 		// interface
 		if (addresses == null) {
-			return null;
+			return new Vector(0).elements();
 		}
 
 		// for those configuration that support the security manager we only
@@ -163,7 +163,7 @@
 			return accessibleAddresses.elements();
 		}
 		
-		return null;
+		return new Vector(0).elements();
 	}
 
 	/**
@@ -237,8 +237,7 @@
 
 		// get the list of interfaces, and then loop through the list. For each
 		// interface loop through the associated set of inet addresses and see
-		// if
-		// one matches. If so return that network interface
+		// if one matches. If so return that network interface
 		Enumeration interfaces = getNetworkInterfaces();
 		if (interfaces != null) {
 			while (interfaces.hasMoreElements()) {



Mime
View raw message