Apache Solr open-source search software
LUCENE-3590: deprecate dancing comparators
Robert Muir7f366cd0da92
diff --git a/lucene/src/java/org/apache/lucene/util/BytesRef.java b/lucene/src/java/org/apache/lucene/util/BytesRef.javaindex 2c94a7005b0..5cbb610b566 100644--- a/lucene/src/java/org/apache/lucene/util/BytesRef.java+++ b/lucene/src/java/org/apache/lucene/util/BytesRef.java@@ -275,12 +275,18 @@ public final class BytesRef implements Comparable<BytesRef>,Cloneable {}}+ /** @deprecated */+ @Deprecatedprivate final static Comparator<BytesRef> utf8SortedAsUTF16SortOrder = new UTF8SortedAsUTF16Comparator();+ /** @deprecated This comparator is only a transition mechanism */+ @Deprecatedpublic static Comparator<BytesRef> getUTF8SortedAsUTF16Comparator() {return utf8SortedAsUTF16SortOrder;}+ /** @deprecated */+ @Deprecatedprivate static class UTF8SortedAsUTF16Comparator implements Comparator<BytesRef> {// Only singletonprivate UTF8SortedAsUTF16Comparator() {};diff --git a/lucene/src/java/org/apache/lucene/util/CharsRef.java b/lucene/src/java/org/apache/lucene/util/CharsRef.javaindex cd38d4a9c0a..6a8c853165f 100644--- a/lucene/src/java/org/apache/lucene/util/CharsRef.java+++ b/lucene/src/java/org/apache/lucene/util/CharsRef.java@@ -216,12 +216,18 @@ public final class CharsRef implements Comparable<CharsRef>, CharSequence, Clonereturn new CharsRef(chars, offset + start, offset + end - 1);}+ /** @deprecated */+ @Deprecatedprivate final static Comparator<CharsRef> utf16SortedAsUTF8SortOrder = new UTF16SortedAsUTF8Comparator();+ /** @deprecated This comparator is only a transition mechanism */+ @Deprecatedpublic static Comparator<CharsRef> getUTF16SortedAsUTF8Comparator() {return utf16SortedAsUTF8SortOrder;}+ /** @deprecated */+ @Deprecatedprivate static class UTF16SortedAsUTF8Comparator implements Comparator<CharsRef> {// Only singletonprivate UTF16SortedAsUTF8Comparator() {};