mirror of https://github.com/apache/lucene.git
LUCENE-2944: fix java6 oops and add proper consumer behavior to NTS reflection
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1083788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e67bf6b089
commit
99c13a4e29
|
@ -186,7 +186,7 @@ public final class NumericTokenStream extends TokenStream {
|
|||
@Override
|
||||
public void reflectWith(AttributeReflector reflector) {
|
||||
fillBytesRef();
|
||||
reflector.reflect(TermToBytesRefAttribute.class, "bytes", bytes);
|
||||
reflector.reflect(TermToBytesRefAttribute.class, "bytes", new BytesRef(bytes));
|
||||
reflector.reflect(NumericTermAttribute.class, "shift", shift);
|
||||
reflector.reflect(NumericTermAttribute.class, "rawValue", getRawValue());
|
||||
reflector.reflect(NumericTermAttribute.class, "valueSize", valueSize);
|
||||
|
|
|
@ -79,12 +79,12 @@ public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttr
|
|||
// *** TermToBytesRefAttribute interface ***
|
||||
private BytesRef bytes = new BytesRef(MIN_BUFFER_SIZE);
|
||||
|
||||
@Override
|
||||
// not until java 6 @Override
|
||||
public int fillBytesRef() {
|
||||
return UnicodeUtil.UTF16toUTF8WithHash(termBuffer, 0, termLength, bytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
// not until java 6 @Override
|
||||
public BytesRef getBytesRef() {
|
||||
return bytes;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue