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:
Uwe Schindler 2012-06-17 13:56:10 +00:00
parent 83616468a0
commit 7f9d6b89aa
2 changed files with 11 additions and 10 deletions

View File

@ -53,6 +53,7 @@ public interface FieldCache {
* Hack: When thrown from a Parser (NUMERIC_UTILS_* ones), this stops * Hack: When thrown from a Parser (NUMERIC_UTILS_* ones), this stops
* processing terms and returns the current FieldCache * processing terms and returns the current FieldCache
* array. * array.
* @lucene.internal
*/ */
public static final class StopFillCacheException extends RuntimeException { 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 static final IntParser NUMERIC_UTILS_INT_PARSER=new IntParser(){
public int parseInt(BytesRef term) { public int parseInt(BytesRef term) {
if (NumericUtils.getPrefixCodedIntShift(term) > 0) if (NumericUtils.getPrefixCodedIntShift(term) > 0)
throw new FieldCacheImpl.StopFillCacheException(); throw new StopFillCacheException();
return NumericUtils.prefixCodedToInt(term); return NumericUtils.prefixCodedToInt(term);
} }
@Override @Override
@ -229,7 +230,7 @@ public interface FieldCache {
public static final FloatParser NUMERIC_UTILS_FLOAT_PARSER=new FloatParser(){ public static final FloatParser NUMERIC_UTILS_FLOAT_PARSER=new FloatParser(){
public float parseFloat(BytesRef term) { public float parseFloat(BytesRef term) {
if (NumericUtils.getPrefixCodedIntShift(term) > 0) if (NumericUtils.getPrefixCodedIntShift(term) > 0)
throw new FieldCacheImpl.StopFillCacheException(); throw new StopFillCacheException();
return NumericUtils.sortableIntToFloat(NumericUtils.prefixCodedToInt(term)); return NumericUtils.sortableIntToFloat(NumericUtils.prefixCodedToInt(term));
} }
@Override @Override
@ -245,7 +246,7 @@ public interface FieldCache {
public static final LongParser NUMERIC_UTILS_LONG_PARSER = new LongParser(){ public static final LongParser NUMERIC_UTILS_LONG_PARSER = new LongParser(){
public long parseLong(BytesRef term) { public long parseLong(BytesRef term) {
if (NumericUtils.getPrefixCodedLongShift(term) > 0) if (NumericUtils.getPrefixCodedLongShift(term) > 0)
throw new FieldCacheImpl.StopFillCacheException(); throw new StopFillCacheException();
return NumericUtils.prefixCodedToLong(term); return NumericUtils.prefixCodedToLong(term);
} }
@Override @Override
@ -261,7 +262,7 @@ public interface FieldCache {
public static final DoubleParser NUMERIC_UTILS_DOUBLE_PARSER = new DoubleParser(){ public static final DoubleParser NUMERIC_UTILS_DOUBLE_PARSER = new DoubleParser(){
public double parseDouble(BytesRef term) { public double parseDouble(BytesRef term) {
if (NumericUtils.getPrefixCodedLongShift(term) > 0) if (NumericUtils.getPrefixCodedLongShift(term) > 0)
throw new FieldCacheImpl.StopFillCacheException(); throw new StopFillCacheException();
return NumericUtils.sortableLongToDouble(NumericUtils.prefixCodedToLong(term)); return NumericUtils.sortableLongToDouble(NumericUtils.prefixCodedToLong(term));
} }
@Override @Override

View File

@ -380,7 +380,7 @@ class FieldCacheImpl implements FieldCache {
} }
} }
} }
} catch (StopFillCacheException stop) { } catch (FieldCache.StopFillCacheException stop) {
} }
} }
if (setDocsWithField) { if (setDocsWithField) {
@ -453,7 +453,7 @@ class FieldCacheImpl implements FieldCache {
} }
} }
} }
} catch (StopFillCacheException stop) { } catch (FieldCache.StopFillCacheException stop) {
} }
} }
if (setDocsWithField) { 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 if (retArray == null) { // no values