mirror of https://github.com/apache/lucene.git
LUCENE-4106: Fix duplicate FieldCache.StopFillCacheException
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1351108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83616468a0
commit
7f9d6b89aa
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue