From d3252a5ca5571e0a97e9a31966ec6b847a3a8574 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Mon, 6 Apr 2015 19:12:23 +0000 Subject: [PATCH] PMD: Useless parentheses git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1671658 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/lang3/StringUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index b742f60d1..a29b9f539 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -7006,7 +7006,7 @@ distance is O(nm), but a bound of k allows us to reduce it to O(km) time by only // compute stripe indices, constrain to array size final int min = Math.max(1, j - threshold); - final int max = (j > Integer.MAX_VALUE - threshold) ? n : Math.min(n, j + threshold); + final int max = j > Integer.MAX_VALUE - threshold ? n : Math.min(n, j + threshold); // the stripe may lead off of the table if s and t are of different sizes if (min > max) { @@ -7109,7 +7109,7 @@ private static double score(final CharSequence first, final CharSequence second) } // Calculate the half length() distance of the shorter String. - final int halflength = (shorter.length() / 2) + 1; + final int halflength = shorter.length() / 2 + 1; // Find the set of matching characters between the shorter and longer strings. Note that // the set of matching characters may be different depending on the order of the strings.