Simplify if statements

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-08-09 17:09:37 +00:00
parent a223126567
commit 1756e67623

View File

@ -40,10 +40,7 @@ final class TokenMatchers {
final Description mismatchDescription) { final Description mismatchDescription) {
mismatchDescription.appendText("token type is "); mismatchDescription.appendText("token type is ");
mismatchDescription.appendValue(item.type); mismatchDescription.appendValue(item.type);
if (item.type == expectedType) { return item.type == expectedType;
return true;
}
return false;
} }
}; };
} }
@ -61,10 +58,7 @@ final class TokenMatchers {
final Description mismatchDescription) { final Description mismatchDescription) {
mismatchDescription.appendText("token content is "); mismatchDescription.appendText("token content is ");
mismatchDescription.appendValue(item.content.toString()); mismatchDescription.appendValue(item.content.toString());
if (expectedContent.equals(item.content.toString())) { return expectedContent.equals(item.content.toString());
return true;
}
return false;
} }
}; };
} }