diff --git a/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java b/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java index cc945133691..1bb32b2bd81 100644 --- a/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java +++ b/lucene/src/test/org/apache/lucene/util/TestNumericUtils.java @@ -31,7 +31,7 @@ public class TestNumericUtils extends LuceneTestCase { NumericUtils.longToPrefixCoded(l, 0, act); if (last!=null) { // test if smaller - assertTrue("actual bigger than last (BytesRef)", BytesRef.getUTF8SortedAsUnicodeComparator().compare(last, act) < 0 ); + assertTrue("actual bigger than last (BytesRef)", last.compareTo(act) < 0 ); assertTrue("actual bigger than last (as String)", last.utf8ToString().compareTo(act.utf8ToString()) < 0 ); } // test is back and forward conversion works @@ -49,7 +49,7 @@ public class TestNumericUtils extends LuceneTestCase { NumericUtils.intToPrefixCoded(i, 0, act); if (last!=null) { // test if smaller - assertTrue("actual bigger than last (BytesRef)", BytesRef.getUTF8SortedAsUnicodeComparator().compare(last, act) < 0 ); + assertTrue("actual bigger than last (BytesRef)", last.compareTo(act) < 0 ); assertTrue("actual bigger than last (as String)", last.utf8ToString().compareTo(act.utf8ToString()) < 0 ); } // test is back and forward conversion works @@ -85,7 +85,7 @@ public class TestNumericUtils extends LuceneTestCase { // check sort order (prefixVals should be ascending) for (int i=1; i