From 321fe8ec63465133ae512d9e9d9ee999091d089d Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Wed, 25 Sep 2013 11:28:00 +0000 Subject: [PATCH] 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 --- .../apache/lucene/analysis/NumericTokenStream.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java b/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java index 29dc1c1aed9..7c7f370900f 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java @@ -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; - } + assert valueSize == 64 || valueSize == 32; + return (valueSize == 64) ? + NumericUtils.longToPrefixCoded(value, shift, bytes) : + NumericUtils.intToPrefixCoded((int) value, shift, bytes); } @Override