commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1512399 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java
Date Fri, 09 Aug 2013 17:09:38 GMT
Author: britter
Date: Fri Aug  9 17:09:37 2013
New Revision: 1512399

URL: http://svn.apache.org/r1512399
Log:
Simplify if statements

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java?rev=1512399&r1=1512398&r2=1512399&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/TokenMatchers.java Fri Aug
 9 17:09:37 2013
@@ -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());
             }
         };
     }



Mime
View raw message