harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r374033 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java
Date Wed, 01 Feb 2006 10:28:27 GMT
Author: tellison
Date: Wed Feb  1 02:28:22 2006
New Revision: 374033

URL: http://svn.apache.org/viewcvs?rev=374033&view=rev
Log:
Fix multicast global check (mask wrong)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java?rev=374033&r1=374032&r2=374033&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Inet6Address.java
Wed Feb  1 02:28:22 2006
@@ -168,7 +168,7 @@
 	/**
 	 * Answer true if the InetAddress is a global multicast address.
 	 * 
-	 * A valid IPv6 global mutlicast address is 11111111xxxx1110
+	 * A valid IPv6 global multicast address is 11111111xxxx1110 (i.e. FF0E)
 	 * 
 	 * @return boolean true, if it is a global mutlicast address, false
 	 *         otherwise
@@ -177,8 +177,7 @@
 
 		// the first byte should be 0xFF and the lower 4 bits
 		// of the second byte should be 0xE
-		return (ipaddress[0] == -1) && (ipaddress[1] & 14) == 14;
-
+		return (ipaddress[0] == -1) && (ipaddress[1] & 15) == 14;
 	}
 
 	/**



Mime
View raw message