[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 3 15:58:02 PST 2003


PatchSet 4191 
Date: 2003/12/03 23:55:36
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2003-12-03  Dalibor Topic <robilad at kaffe.org>

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

        2003-11-26  Michael Koch  <konqueror at gmx.de>

        * java/net/InetSocketAddress.java
        (hostname): Made private, added documentation.
        (addr): Likewise.
        (port): Likewise.
        (equals): Completed documentation.
        (getAddress): Likewise.
        (getHostName): Likewise.
        (getPort): Likewise.
        (hashCode): Likewise.
        (isUnresolved): Likewise.
        (toString): Likewise.

Members: 
	ChangeLog:1.1782->1.1783 
	libraries/javalib/java/net/InetSocketAddress.java:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1782 kaffe/ChangeLog:1.1783
--- kaffe/ChangeLog:1.1782	Wed Dec  3 23:18:01 2003
+++ kaffe/ChangeLog	Wed Dec  3 23:55:36 2003
@@ -1,5 +1,24 @@
 2003-12-03  Dalibor Topic <robilad at kaffe.org>
 
+	* libraries/javalib/java/net/InetSocketAddress.java:
+	Resynced with GNU Classpath.
+
+	2003-11-26  Michael Koch  <konqueror at gmx.de>
+
+        * java/net/InetSocketAddress.java
+        (hostname): Made private, added documentation.
+        (addr): Likewise.
+        (port): Likewise.
+        (equals): Completed documentation.
+        (getAddress): Likewise.
+        (getHostName): Likewise.
+        (getPort): Likewise.
+        (hashCode): Likewise.
+        (isUnresolved): Likewise.
+        (toString): Likewise.
+
+2003-12-03  Dalibor Topic <robilad at kaffe.org>
+
 	* libraries/javalib/java/net/DatagramSocket.java,
 	libraries/javalib/java/net/MulticastSocket.java,
 	libraries/javalib/java/net/ServerSocket.java,
Index: kaffe/libraries/javalib/java/net/InetSocketAddress.java
diff -u kaffe/libraries/javalib/java/net/InetSocketAddress.java:1.7 kaffe/libraries/javalib/java/net/InetSocketAddress.java:1.8
--- kaffe/libraries/javalib/java/net/InetSocketAddress.java:1.7	Sat Oct 25 18:30:24 2003
+++ kaffe/libraries/javalib/java/net/InetSocketAddress.java	Wed Dec  3 23:55:39 2003
@@ -52,9 +52,20 @@
    */
   private static final long serialVersionUID = 5076001401234631237L;
   
-  String hostname;
-  InetAddress addr;
-  int port;
+  /**
+   * Name of host.
+   */
+  private String hostname;
+
+  /**
+   * Address of host.
+   */
+  private InetAddress addr;
+
+  /**
+   * Port of host.
+   */
+  private int port;
     
   /**
    * Constructs an InetSocketAddress instance.
@@ -124,6 +135,10 @@
   /** 
    * Test if obj is a <code>InetSocketAddress</code> and
    * has the same address and port
+   *
+   * @param obj The obj to compare this address with.
+   *
+   * @return True if obj is equal.   
    */
   public final boolean equals (Object obj)
   {
@@ -132,13 +147,14 @@
 
     if (obj instanceof InetSocketAddress)
       {
-        InetSocketAddress a = (InetSocketAddress) obj;
-	if (addr == null && a.addr != null)
-	  return false;
-	else if (addr == null && a.addr == null)
-	  return hostname.equals(a.hostname) && a.port == port;
-	else
-          return addr.equals(a.addr) && a.port == port;
+        InetSocketAddress sa = (InetSocketAddress) obj;
+	
+        if (addr == null && sa.addr != null)
+          return false;
+        else if (addr == null && sa.addr == null)
+          return hostname.equals (sa.hostname) && sa.port == port;
+        else
+          return addr.equals (sa.addr) && sa.port == port;
       }
     
     return false;
@@ -147,6 +163,8 @@
   /**
    * Returns the <code>InetAddress</code> or
    * <code>null</code> if its unresolved
+   *
+   * @return The IP address of this address.
    */
   public final InetAddress getAddress()
   {
@@ -155,6 +173,8 @@
 
   /**
    * Returns <code>hostname</code>
+   *
+   * @return The hostname of this address.
    */
   public final String getHostName()
   {
@@ -163,6 +183,8 @@
 
   /**
    * Returns the <code>port</code>
+   *
+   * @return The port of this address.
    */
   public final int getPort()
   {
@@ -171,6 +193,8 @@
     
   /**
    * Returns the hashcode of the <code>InetSocketAddress</code>
+   *
+   * @return The hashcode for this address.
    */
   public final int hashCode()
   {
@@ -179,6 +203,8 @@
 
   /**
    * Checks wether the address has been resolved or not
+   *
+   * @return True if address is unresolved.
    */
   public final boolean isUnresolved()
   {
@@ -187,6 +213,8 @@
     
   /**
    * Returns the <code>InetSocketAddress</code> as string
+   *
+   * @return A string represenation of this address.
    */
   public String toString()
   {




More information about the kaffe mailing list