LUCENE-3590: deprecate dancing comparators

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1206435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-11-26 13:32:28 +00:00
parent af65c91000
commit 7f366cd0da
2 changed files with 12 additions and 0 deletions

View File

@ -275,12 +275,18 @@ public final class BytesRef implements Comparable<BytesRef>,Cloneable {
}
}
/** @deprecated */
@Deprecated
private final static Comparator<BytesRef> utf8SortedAsUTF16SortOrder = new UTF8SortedAsUTF16Comparator();
/** @deprecated This comparator is only a transition mechanism */
@Deprecated
public static Comparator<BytesRef> getUTF8SortedAsUTF16Comparator() {
return utf8SortedAsUTF16SortOrder;
}
/** @deprecated */
@Deprecated
private static class UTF8SortedAsUTF16Comparator implements Comparator<BytesRef> {
// Only singleton
private UTF8SortedAsUTF16Comparator() {};

View File

@ -216,12 +216,18 @@ public final class CharsRef implements Comparable<CharsRef>, CharSequence, Clone
return new CharsRef(chars, offset + start, offset + end - 1);
}
/** @deprecated */
@Deprecated
private final static Comparator<CharsRef> utf16SortedAsUTF8SortOrder = new UTF16SortedAsUTF8Comparator();
/** @deprecated This comparator is only a transition mechanism */
@Deprecated
public static Comparator<CharsRef> getUTF16SortedAsUTF8Comparator() {
return utf16SortedAsUTF8SortOrder;
}
/** @deprecated */
@Deprecated
private static class UTF16SortedAsUTF8Comparator implements Comparator<CharsRef> {
// Only singleton
private UTF16SortedAsUTF8Comparator() {};