committed by
Mark Paluch
parent
f28bf61142
commit
85e9ae50ff
@@ -91,18 +91,17 @@ public class Address implements Serializable {
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj instanceof Address))
|
||||
if (!(obj instanceof Address that))
|
||||
return false;
|
||||
Address other = (Address) obj;
|
||||
if (number == null) {
|
||||
if (other.number != null)
|
||||
if (that.number != null)
|
||||
return false;
|
||||
} else if (!number.equals(other.number))
|
||||
} else if (!number.equals(that.number))
|
||||
return false;
|
||||
if (street == null) {
|
||||
if (other.street != null)
|
||||
if (that.street != null)
|
||||
return false;
|
||||
} else if (!street.equals(other.street))
|
||||
} else if (!street.equals(that.street))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -96,28 +96,27 @@ public class Person implements Serializable {
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj instanceof Person))
|
||||
if (!(obj instanceof Person that))
|
||||
return false;
|
||||
Person other = (Person) obj;
|
||||
if (address == null) {
|
||||
if (other.address != null)
|
||||
if (that.address != null)
|
||||
return false;
|
||||
} else if (!address.equals(other.address))
|
||||
} else if (!address.equals(that.address))
|
||||
return false;
|
||||
if (age == null) {
|
||||
if (other.age != null)
|
||||
if (that.age != null)
|
||||
return false;
|
||||
} else if (!age.equals(other.age))
|
||||
} else if (!age.equals(that.age))
|
||||
return false;
|
||||
if (firstName == null) {
|
||||
if (other.firstName != null)
|
||||
if (that.firstName != null)
|
||||
return false;
|
||||
} else if (!firstName.equals(other.firstName))
|
||||
} else if (!firstName.equals(that.firstName))
|
||||
return false;
|
||||
if (lastName == null) {
|
||||
if (other.lastName != null)
|
||||
if (that.lastName != null)
|
||||
return false;
|
||||
} else if (!lastName.equals(other.lastName))
|
||||
} else if (!lastName.equals(that.lastName))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user