This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-text.git
commit 41aa81c0318c29fcf50715edf43ddceafdcdf48e Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Jul 15 08:51:12 2024 -0400 Reduce use of deprecated code --- .../java/org/apache/commons/text/similarity/StringMetricFromTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/text/similarity/StringMetricFromTest.java b/src/test/java/org/apache/commons/text/similarity/StringMetricFromTest.java index 7f0c33fd..cffa4f5d 100644 --- a/src/test/java/org/apache/commons/text/similarity/StringMetricFromTest.java +++ b/src/test/java/org/apache/commons/text/similarity/StringMetricFromTest.java @@ -28,7 +28,7 @@ public class StringMetricFromTest { @Test public void testEquivalence() { - final EditDistance<Integer> metric = new LevenshteinDistance(); + final EditDistance<Integer> metric = LevenshteinDistance.getDefaultInstance(); final String left = "Apache"; final String right = "a patchy"; final Integer distance = 4; @@ -40,7 +40,7 @@ public class StringMetricFromTest { @Test public void testJavadocExample() { - final EditDistance<Integer> metric = new LevenshteinDistance(); + final EditDistance<Integer> metric = LevenshteinDistance.getDefaultInstance(); final String target = "Apache"; final EditDistanceFrom<Integer> metricFrom = new EditDistanceFrom<>(metric, target);