You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2011/12/11 12:12:35 UTC
svn commit: r1212991 -
/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java
Author: uschindler
Date: Sun Dec 11 11:12:34 2011
New Revision: 1212991
URL: http://svn.apache.org/viewvc?rev=1212991&view=rev
Log:
Use FieldReaderException only for LazyField, where it needs to be RuntimeException
Modified:
lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java
Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java?rev=1212991&r1=1212990&r2=1212991&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/FieldsReader.java Sun Dec 11 11:12:34 2011
@@ -320,7 +320,7 @@ final class FieldsReader implements Clon
numBytes = 8;
break;
default:
- throw new FieldReaderException("Invalid numeric type: " + Integer.toHexString(numeric));
+ throw new CorruptIndexException("Invalid numeric type: " + Integer.toHexString(numeric));
}
skipFieldBytes(binary, compressed, numBytes);
@@ -347,7 +347,7 @@ final class FieldsReader implements Clon
case FieldsWriter.FIELD_IS_NUMERIC_DOUBLE:
return new NumericField(fi.name, Field.Store.YES, fi.isIndexed).setDoubleValue(Double.longBitsToDouble(fieldsStream.readLong()));
default:
- throw new FieldReaderException("Invalid numeric type: " + Integer.toHexString(numeric));
+ throw new CorruptIndexException("Invalid numeric type: " + Integer.toHexString(numeric));
}
}
@@ -453,7 +453,7 @@ final class FieldsReader implements Clon
size = bytesize = 8;
break;
default:
- throw new FieldReaderException("Invalid numeric type: " + Integer.toHexString(numeric));
+ throw new CorruptIndexException("Invalid numeric type: " + Integer.toHexString(numeric));
}
byte[] sizebytes = new byte[4];
sizebytes[0] = (byte) (bytesize>>>24);