Skip to content

Apache Lucene open-source search software

LUCENE-4106: Fix duplicate FieldCache.StopFillCacheException

Uwe Schindler7f9d6b89aaff
diff --git a/lucene/core/src/java/org/apache/lucene/search/FieldCache.java b/lucene/core/src/java/org/apache/lucene/search/FieldCache.java
index 4296d34b0f6..590d784d77f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/FieldCache.java
+++ b/lucene/core/src/java/org/apache/lucene/search/FieldCache.java
@@ -53,6 +53,7 @@ public interface FieldCache {
* Hack: When thrown from a Parser (NUMERIC_UTILS_* ones), this stops
* processing terms and returns the current FieldCache
* array.
+ * @lucene.internal
*/
public static final class StopFillCacheException extends RuntimeException {
}
@@ -213,7 +214,7 @@ public interface FieldCache {
public static final IntParser NUMERIC_UTILS_INT_PARSER=new IntParser(){
public int parseInt(BytesRef term) {
if (NumericUtils.getPrefixCodedIntShift(term) > 0)
- throw new FieldCacheImpl.StopFillCacheException();
+ throw new StopFillCacheException();
return NumericUtils.prefixCodedToInt(term);
}
@Override
@@ -229,7 +230,7 @@ public interface FieldCache {
public static final FloatParser NUMERIC_UTILS_FLOAT_PARSER=new FloatParser(){
public float parseFloat(BytesRef term) {
if (NumericUtils.getPrefixCodedIntShift(term) > 0)
- throw new FieldCacheImpl.StopFillCacheException();
+ throw new StopFillCacheException();
return NumericUtils.sortableIntToFloat(NumericUtils.prefixCodedToInt(term));
}
@Override
@@ -245,7 +246,7 @@ public interface FieldCache {
public static final LongParser NUMERIC_UTILS_LONG_PARSER = new LongParser(){
public long parseLong(BytesRef term) {
if (NumericUtils.getPrefixCodedLongShift(term) > 0)
- throw new FieldCacheImpl.StopFillCacheException();
+ throw new StopFillCacheException();
return NumericUtils.prefixCodedToLong(term);
}
@Override
@@ -261,7 +262,7 @@ public interface FieldCache {
public static final DoubleParser NUMERIC_UTILS_DOUBLE_PARSER = new DoubleParser(){
public double parseDouble(BytesRef term) {
if (NumericUtils.getPrefixCodedLongShift(term) > 0)
- throw new FieldCacheImpl.StopFillCacheException();
+ throw new StopFillCacheException();
return NumericUtils.sortableLongToDouble(NumericUtils.prefixCodedToLong(term));
}
@Override
diff --git a/lucene/core/src/java/org/apache/lucene/search/FieldCacheImpl.java b/lucene/core/src/java/org/apache/lucene/search/FieldCacheImpl.java
index f9901f5b0e8..f3ec3478a82 100644
--- a/lucene/core/src/java/org/apache/lucene/search/FieldCacheImpl.java
+++ b/lucene/core/src/java/org/apache/lucene/search/FieldCacheImpl.java
@@ -380,7 +380,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
if (setDocsWithField) {
@@ -453,7 +453,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
if (setDocsWithField) {
@@ -557,7 +557,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
@@ -707,7 +707,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
@@ -795,7 +795,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
@@ -884,7 +884,7 @@ class FieldCacheImpl implements FieldCache {
}
}
}
- } catch (StopFillCacheException stop) {
+ } catch (FieldCache.StopFillCacheException stop) {
}
}
if (retArray == null) { // no values