Github user luciano-medallia commented on a diff in the pull request: https://github.com/apache/commons-text/pull/85#discussion_r202554676 --- Diff: src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java --- @@ -270,12 +270,6 @@ private static int limitedCompare(CharSequence left, CharSequence right, final i 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) { --- End diff -- Now we know that m - n <= threshold. Therefore, j - threshold > n cannot be true, because j's maximum value is m, and in that case the inequality is equivalent to: m - m > threshold
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org