[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: fix for IPv6 getHostAddress

Kaffe CVS cvs-commits at kaffe.org
Tue Nov 23 18:57:15 PST 2004


PatchSet 5472 
Date: 2004/11/24 02:52:41
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: fix for IPv6 getHostAddress

2004-11-24  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/java/net/Inet6Address.java:
        Resynced with GNU Classpath.

        2004-11-14  Mattias Rehnberg  <Mattias.Rehnberg at home.se>

        * java/net/Inet6Address.java (getHostAddress): Fix textual
        representation of IPv6 address with embedded zeroes
        to conform to RFC 2373.

Members: 
	ChangeLog:1.3018->1.3019 
	libraries/javalib/java/net/Inet6Address.java:1.5->1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3018 kaffe/ChangeLog:1.3019
--- kaffe/ChangeLog:1.3018	Wed Nov 24 01:37:50 2004
+++ kaffe/ChangeLog	Wed Nov 24 02:52:41 2004
@@ -1,5 +1,16 @@
 2004-11-24  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/java/net/Inet6Address.java:
+	Resynced with GNU Classpath.
+
+	2004-11-14  Mattias Rehnberg  <Mattias.Rehnberg at home.se>
+
+        * java/net/Inet6Address.java (getHostAddress): Fix textual
+        representation of IPv6 address with embedded zeroes
+        to conform to RFC 2373.
+
+2004-11-24  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/javax/swing/ToolTipManager.java:
 	Resynced with GNU Classpath.
 
Index: kaffe/libraries/javalib/java/net/Inet6Address.java
diff -u kaffe/libraries/javalib/java/net/Inet6Address.java:1.5 kaffe/libraries/javalib/java/net/Inet6Address.java:1.6
--- kaffe/libraries/javalib/java/net/Inet6Address.java:1.5	Fri Oct 15 19:00:30 2004
+++ kaffe/libraries/javalib/java/net/Inet6Address.java	Wed Nov 24 02:52:43 2004
@@ -207,18 +207,11 @@
     for (int i = 0; i < 16; i += 2)
       {
 	int x = ((ipaddress[i] & 0xFF) << 8) | (ipaddress[i + 1] & 0xFF);
-	boolean empty = sbuf.length() == 0;
 
-	if (empty)
-	  {
-	    if (i > 0)
-	      sbuf.append("::");
-	  }
-	else
+	if (i > 0)
 	  sbuf.append(':');
 
-	if (x != 0 || i >= 14)
-	  sbuf.append(Integer.toHexString(x));
+	sbuf.append(Integer.toHexString(x));
       }
 
     return sbuf.toString();




More information about the kaffe mailing list