Use blocks.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1199893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2011-11-09 17:42:00 +00:00
parent 57251859b6
commit 725ca33769
1 changed files with 12 additions and 6 deletions

View File

@ -936,12 +936,15 @@ public TestACanEqualB(int a) {
@Override
public boolean equals(Object o) {
if (o == this)
if (o == this) {
return true;
if (o instanceof TestACanEqualB)
}
if (o instanceof TestACanEqualB) {
return this.a == ((TestACanEqualB) o).getA();
if (o instanceof TestBCanEqualA)
}
if (o instanceof TestBCanEqualA) {
return this.a == ((TestBCanEqualA) o).getB();
}
return false;
}
@ -959,12 +962,15 @@ public TestBCanEqualA(int b) {
@Override
public boolean equals(Object o) {
if (o == this)
if (o == this) {
return true;
if (o instanceof TestACanEqualB)
}
if (o instanceof TestACanEqualB) {
return this.b == ((TestACanEqualB) o).getA();
if (o instanceof TestBCanEqualA)
}
if (o instanceof TestBCanEqualA) {
return this.b == ((TestBCanEqualA) o).getB();
}
return false;
}