mirror of https://github.com/apache/lucene.git
LUCENE-5235: This is according to Clover never hit, so be more strict, may help Robert
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1526155 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8dae16c6d9
commit
321fe8ec63
|
@ -160,16 +160,10 @@ public final class NumericTokenStream extends TokenStream {
|
|||
|
||||
@Override
|
||||
public int fillBytesRef() {
|
||||
try {
|
||||
assert valueSize == 64 || valueSize == 32;
|
||||
return (valueSize == 64) ?
|
||||
NumericUtils.longToPrefixCoded(value, shift, bytes) :
|
||||
NumericUtils.intToPrefixCoded((int) value, shift, bytes);
|
||||
} catch (IllegalArgumentException iae) {
|
||||
// return empty token before first or after last
|
||||
bytes.length = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue