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
1 changed files with 2 additions and 8 deletions

View File

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