Pavlin Radoslavov

Changed the semantics of IpAddress.equals() to (eventually) return true

if both objects are instanceof IpAddress.
I.e., comparing IpAddress and Ip4Address objects could return true
if the underlying value is same.

Applied the same change to IpPrefix.equals() as well.

Change-Id: Ie0644565501d3ecce2a8603117b994d033d5b82f
......@@ -312,7 +312,7 @@ public class IpAddress implements Comparable<IpAddress> {
if (this == obj) {
return true;
}
if ((obj == null) || (getClass() != obj.getClass())) {
if ((obj == null) || (!(obj instanceof IpAddress))) {
return false;
}
IpAddress other = (IpAddress) obj;
......
......@@ -221,7 +221,7 @@ public class IpPrefix {
if (this == obj) {
return true;
}
if ((obj == null) || (getClass() != obj.getClass())) {
if ((obj == null) || (!(obj instanceof IpPrefix))) {
return false;
}
IpPrefix other = (IpPrefix) obj;
......