lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1526155 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
Date Wed, 25 Sep 2013 11:28:00 GMT
Author: uschindler
Date: Wed Sep 25 11:28:00 2013
New Revision: 1526155

URL: http://svn.apache.org/r1526155
Log:
LUCENE-5235: This is according to Clover never hit, so be more strict, may help Robert

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java?rev=1526155&r1=1526154&r2=1526155&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
Wed Sep 25 11:28:00 2013
@@ -160,16 +160,10 @@ public final class NumericTokenStream ex
     
     @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



Mime
View raw message