From 1756e676235dcb78aa726615df2ae8e83c2e6d14 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Fri, 9 Aug 2013 17:09:37 +0000 Subject: [PATCH] Simplify if statements git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512399 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/csv/TokenMatchers.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/TokenMatchers.java b/src/test/java/org/apache/commons/csv/TokenMatchers.java index ba39c4c8..296bc25b 100644 --- a/src/test/java/org/apache/commons/csv/TokenMatchers.java +++ b/src/test/java/org/apache/commons/csv/TokenMatchers.java @@ -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()); } }; }