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:
Uwe Schindler 2013-09-25 11:28:00 +00:00
parent 8dae16c6d9
commit 321fe8ec63
1 changed files with 4 additions and 10 deletions

View File

@ -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