+2007-02-05 Tom Tromey <tromey@redhat.com>
+
+ * java/net/Proxy.java (equals): Handle case where address==null.
+ (hashCode): Likewise.
+ (toString): Likewise.
+
2007-01-31 Tom Tromey <tromey@redhat.com>
* resource/gnu/classpath/tools/jar/messages.properties
/* Proxy.java -- Represends a proxy for a network connection
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
Proxy tmp = (Proxy) obj;
return (type.equals(tmp.type)
- && address.equals(tmp.address));
+ && (address == null ? tmp.address == null
+ : address.equals(tmp.address)));
}
/**
*/
public final int hashCode()
{
- return type.hashCode() ^ address.hashCode();
+ return type.hashCode() ^ (address == null ? 0 : address.hashCode());
}
/**
*/
public String toString()
{
- return type.toString() + ":" + address.toString();
+ return type.toString() + (address == null ? ""
+ : (":" + address.toString()));
}
}