commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1436561 - /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
Date Mon, 21 Jan 2013 19:15:41 GMT
Author: ggregory
Date: Mon Jan 21 19:15:40 2013
New Revision: 1436561

URL: http://svn.apache.org/viewvc?rev=1436561&view=rev
Log:
Remove unnecessary parentheses.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java?rev=1436561&r1=1436560&r2=1436561&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
Mon Jan 21 19:15:40 2013
@@ -184,9 +184,9 @@ public class MatchRatingApproachEncoder 
 
         if (sumLength <= FOUR) {
             minRating = FIVE;
-        } else if ((sumLength >= FIVE) && (sumLength <= SEVEN)) {
+        } else if (sumLength >= FIVE && sumLength <= SEVEN) {
             minRating = FOUR;
-        } else if ((sumLength >= EIGHT) && (sumLength <= ELEVEN)) {
+        } else if (sumLength >= EIGHT && sumLength <= ELEVEN) {
             minRating = THREE;
         } else if (sumLength == TWELVE) {
             minRating = TWO;
@@ -308,10 +308,10 @@ public class MatchRatingApproachEncoder 
             }
 
             name1LtRStart = name1.substring(i, i + 1);
-            name1LtREnd = name1.substring(name1Size - i, (name1Size - i) + 1);
+            name1LtREnd = name1.substring(name1Size - i, name1Size - i + 1);
 
             name2RtLStart = name2.substring(i, i + 1);
-            name2RtLEnd = name2.substring(name2Size - i, (name2Size - i) + 1);
+            name2RtLEnd = name2.substring(name2Size - i, name2Size - i + 1);
 
             // Left to right...
             if (name1LtRStart.equals(name2RtLStart)) {
@@ -416,7 +416,7 @@ public class MatchRatingApproachEncoder 
 
         // return isVowel(firstLetter) ? (firstLetter + name) : name;
         if (isVowel(firstLetter)) {
-            return (firstLetter + name);
+            return firstLetter + name;
         } else {
             return name;
         }



Mime
View raw message