commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ki...@apache.org
Subject [1/2] [text] Fix PMD warnings (keep parenthesis for clarity)
Date Wed, 09 Nov 2016 08:09:45 GMT
Repository: commons-text
Updated Branches:
  refs/heads/master 0622f5a80 -> c8a803c21


Fix PMD warnings (keep parenthesis for clarity)


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/579fd28e
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/579fd28e
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/579fd28e

Branch: refs/heads/master
Commit: 579fd28e3060ed672ac945894352c98bce98ed8c
Parents: 0622f5a
Author: Bruno P. Kinoshita <brunodepaulak@yahoo.com.br>
Authored: Wed Nov 9 20:42:30 2016 +1300
Committer: Bruno P. Kinoshita <brunodepaulak@yahoo.com.br>
Committed: Wed Nov 9 20:42:30 2016 +1300

----------------------------------------------------------------------
 .../commons/text/similarity/LevenshteinDetailedDistance.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/579fd28e/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
index 555404b..d0869a2 100644
--- a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
@@ -159,7 +159,7 @@ public class LevenshteinDetailedDistance implements EditDistance<LevenshteinResu
      * @param threshold the target threshold, must not be negative
      * @return result distance, or -1
      */
-    private static LevenshteinResults limitedCompare(CharSequence left, CharSequence right,
int threshold) {
+    private static LevenshteinResults limitedCompare(CharSequence left, CharSequence right,
int threshold) { // NOPMD
         if (left == null || right == null) {
             throw new IllegalArgumentException("Strings must not be null");
         }
@@ -496,7 +496,7 @@ public class LevenshteinDetailedDistance implements EditDistance<LevenshteinResu
             deleted = false;
             added = false;
             if (data - 1 == dataAtLeft && (data <= dataAtDiagonal && data
<= dataAtTop)
-                    || (dataAtDiagonal == -1 && dataAtTop == -1)) {
+                    || (dataAtDiagonal == -1 && dataAtTop == -1)) { // NOPMD
                 columnIndex--;
                 if (swapped == true) {
                     addCount++;
@@ -507,7 +507,7 @@ public class LevenshteinDetailedDistance implements EditDistance<LevenshteinResu
                 }
             }
             else if (data - 1 == dataAtTop && (data <= dataAtDiagonal &&
data <= dataAtLeft)
-                    || (dataAtDiagonal == -1 && dataAtLeft == -1)) {
+                    || (dataAtDiagonal == -1 && dataAtLeft == -1)) { // NOPMD
                 rowIndex--;
                 if (swapped == true) {
                     delCount++;


Mime
View raw message