/[classpath]/classpath/java/net/Inet6Address.java
ViewVC logotype

Diff of /classpath/java/net/Inet6Address.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.2 by gnu_andrew, Sun Jan 16 02:14:48 2005 UTC revision 1.7.2.3 by gnu_andrew, Thu Apr 28 23:00:13 2005 UTC
# Line 65  public final class Inet6Address extends Line 65  public final class Inet6Address extends
65    Inet6Address(byte[] addr, String host)    Inet6Address(byte[] addr, String host)
66    {    {
67      super(addr, host);      super(addr, host);
68      this.ipaddress = addr;      // Super constructor clones the addr.  Get a reference to the clone.
69        this.ipaddress = this.addr;
70    }    }
71    
72    /**    /**
# Line 194  public final class Inet6Address extends Line 195  public final class Inet6Address extends
195     */     */
196    public byte[] getAddress()    public byte[] getAddress()
197    {    {
198      return ipaddress;      return (byte[]) ipaddress.clone();
199    }    }
200    
201    /**    /**
# Line 233  public final class Inet6Address extends Line 234  public final class Inet6Address extends
234      if (! (obj instanceof Inet6Address))      if (! (obj instanceof Inet6Address))
235        return false;        return false;
236    
237      Inet6Address tmp = (Inet6Address) obj;      // this.ipaddress is never set in this class except to
238        // the value of the super class' addr.  The super classes
239      return super.equals(tmp) && this.ipaddress == tmp.ipaddress;      // equals(Object) will do the compare.
240        return super.equals(obj);
241    }    }
242    
243    /**    /**

Legend:
Removed from v.1.7.2.2  
changed lines
  Added in v.1.7.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26