Applying the suggested change in use to the unit test as per LANG-353

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@594276 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2007-11-12 19:55:14 +00:00
parent f58c863e0b
commit 9926e31ac1
1 changed files with 8 additions and 8 deletions

View File

@ -66,12 +66,12 @@ public class EqualsBuilderTest extends TestCase {
this.a = a;
}
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestObject)) {
if (o == null) { return false; }
if (o == this) { return true; }
if (o.getClass() != getClass()) {
return false;
}
TestObject rhs = (TestObject) o;
return (a == rhs.a);
}
@ -95,12 +95,12 @@ public class EqualsBuilderTest extends TestCase {
this.b = b;
}
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TestSubObject)) {
if (o == null) { return false; }
if (o == this) { return true; }
if (o.getClass() != getClass()) {
return false;
}
TestSubObject rhs = (TestSubObject) o;
return super.equals(o) && (b == rhs.b);
}