[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: InetAddress cleanups

Kaffe CVS cvs-commits at kaffe.org
Sat Oct 16 07:52:51 PDT 2004


PatchSet 5301 
Date: 2004/10/16 14:48:46
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: InetAddress cleanups

2004-10-16  Dalibor Topic <robilad at kaffe.org>

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

        2004-10-15  Michael Koch  <konqueror at gmx.de>

        * java/net/InetAddress.java
        (InetAddress): Don't initialize address field. Its only used during
        serialization.
        (toString): Simplified.

Members: 
	ChangeLog:1.2853->1.2854 
	libraries/javalib/java/net/InetAddress.java:1.24->1.25 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2853 kaffe/ChangeLog:1.2854
--- kaffe/ChangeLog:1.2853	Sat Oct 16 13:30:57 2004
+++ kaffe/ChangeLog	Sat Oct 16 14:48:46 2004
@@ -1,4 +1,16 @@
-2004-10-15  Dalibor Topic <robilad at kaffe.org>
+2004-10-16  Dalibor Topic <robilad at kaffe.org>
+
+	*  libraries/javalib/java/net/InetAddress.java:
+	Resynced with GNU Classpath.
+
+	2004-10-15  Michael Koch  <konqueror at gmx.de>
+
+        * java/net/InetAddress.java
+        (InetAddress): Don't initialize address field. Its only used during
+        serialization.
+        (toString): Simplified.
+
+2004-10-16  Dalibor Topic <robilad at kaffe.org>
 
 	* libraries/javalib/java/net/HttpURLConnection.java,
 	libraries/javalib/java/net/MimeTypeMapper.java,
Index: kaffe/libraries/javalib/java/net/InetAddress.java
diff -u kaffe/libraries/javalib/java/net/InetAddress.java:1.24 kaffe/libraries/javalib/java/net/InetAddress.java:1.25
--- kaffe/libraries/javalib/java/net/InetAddress.java:1.24	Fri Oct 15 19:00:30 2004
+++ kaffe/libraries/javalib/java/net/InetAddress.java	Sat Oct 16 14:48:49 2004
@@ -243,10 +243,6 @@
     lookup_time = System.currentTimeMillis();
 
     family = 2; /* AF_INET */
-    address = addr[3] & 0xff;
-    address |= (addr[2] << 8) & 0xff00;
-    address |= (addr[1] << 16) & 0xff0000;
-    address |= (addr[0] << 24) & 0xff000000;
   }
 
   /**
@@ -550,14 +546,8 @@
    */
   public String toString()
   {
-    String host;
     String address = getHostAddress();
-
-    if (hostName != null)
-      host = hostName;
-    else
-      host = address;
-
+    String host = (hostName != null) ? hostName : address;
     return host + "/" + address;
   }
 



More information about the kaffe mailing list