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