You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2012/06/28 18:40:37 UTC
svn commit: r1355069 [2/8] - in /lucene/dev/trunk:
lucene/analysis/common/src/java/org/apache/lucene/analysis/cjk/
lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/
lucene/analysis/common/src/java/org/apache/lucene/analys...
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java Thu Jun 28 16:39:25 2012
@@ -319,7 +319,7 @@ public class Lucene40PostingsReader exte
protected boolean skipped;
protected final Bits liveDocs;
- SegmentDocsEnumBase(IndexInput startFreqIn, Bits liveDocs) throws IOException {
+ SegmentDocsEnumBase(IndexInput startFreqIn, Bits liveDocs) {
this.startFreqIn = startFreqIn;
this.freqIn = (IndexInput)startFreqIn.clone();
this.liveDocs = liveDocs;
@@ -353,7 +353,7 @@ public class Lucene40PostingsReader exte
}
@Override
- public final int freq() throws IOException {
+ public final int freq() {
assert !indexOmitsTF;
return freq;
}
@@ -499,7 +499,7 @@ public class Lucene40PostingsReader exte
private final class AllDocsSegmentDocsEnum extends SegmentDocsEnumBase {
- AllDocsSegmentDocsEnum(IndexInput startFreqIn) throws IOException {
+ AllDocsSegmentDocsEnum(IndexInput startFreqIn) {
super(startFreqIn, null);
assert liveDocs == null;
}
@@ -576,7 +576,7 @@ public class Lucene40PostingsReader exte
private final class LiveDocsSegmentDocsEnum extends SegmentDocsEnumBase {
- LiveDocsSegmentDocsEnum(IndexInput startFreqIn, Bits liveDocs) throws IOException {
+ LiveDocsSegmentDocsEnum(IndexInput startFreqIn, Bits liveDocs) {
super(startFreqIn, liveDocs);
assert liveDocs != null;
}
@@ -696,7 +696,7 @@ public class Lucene40PostingsReader exte
Lucene40SkipListReader skipper;
private long lazyProxPointer;
- public SegmentDocsAndPositionsEnum(IndexInput freqIn, IndexInput proxIn) throws IOException {
+ public SegmentDocsAndPositionsEnum(IndexInput freqIn, IndexInput proxIn) {
startFreqIn = freqIn;
this.freqIn = (IndexInput) freqIn.clone();
this.proxIn = (IndexInput) proxIn.clone();
@@ -772,7 +772,7 @@ public class Lucene40PostingsReader exte
}
@Override
- public int freq() throws IOException {
+ public int freq() {
return freq;
}
@@ -853,12 +853,12 @@ public class Lucene40PostingsReader exte
}
@Override
- public int startOffset() throws IOException {
+ public int startOffset() {
return -1;
}
@Override
- public int endOffset() throws IOException {
+ public int endOffset() {
return -1;
}
@@ -909,7 +909,7 @@ public class Lucene40PostingsReader exte
int offsetLength;
int startOffset;
- public SegmentFullPositionsEnum(IndexInput freqIn, IndexInput proxIn) throws IOException {
+ public SegmentFullPositionsEnum(IndexInput freqIn, IndexInput proxIn) {
startFreqIn = freqIn;
this.freqIn = (IndexInput) freqIn.clone();
this.proxIn = (IndexInput) proxIn.clone();
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java Thu Jun 28 16:39:25 2012
@@ -136,7 +136,7 @@ public final class Lucene40StoredFieldsR
indexStream.seek(HEADER_LENGTH_IDX + docID * 8L);
}
- public final void visitDocument(int n, StoredFieldVisitor visitor) throws CorruptIndexException, IOException {
+ public final void visitDocument(int n, StoredFieldVisitor visitor) throws IOException {
seekIndex(n);
fieldsStream.seek(indexStream.readLong());
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java Thu Jun 28 16:39:25 2012
@@ -22,12 +22,10 @@ import org.apache.lucene.codecs.CodecUti
import org.apache.lucene.codecs.StoredFieldsReader;
import org.apache.lucene.codecs.StoredFieldsWriter;
import org.apache.lucene.document.Document;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.index.MergePolicy.MergeAbortedException;
import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.SegmentReader;
import org.apache.lucene.store.Directory;
@@ -209,7 +207,7 @@ public final class Lucene40StoredFieldsW
}
@Override
- public void finish(FieldInfos fis, int numDocs) throws IOException {
+ public void finish(FieldInfos fis, int numDocs) {
if (HEADER_LENGTH_IDX+((long) numDocs)*8 != indexStream.getFilePointer())
// This is most likely a bug in Sun JRE 1.6.0_04/_05;
// we detect that the bug has struck, here, and
@@ -255,7 +253,7 @@ public final class Lucene40StoredFieldsW
private int copyFieldsWithDeletions(MergeState mergeState, final MergeState.IndexReaderAndLiveDocs reader,
final Lucene40StoredFieldsReader matchingFieldsReader, int rawDocLengths[])
- throws IOException, MergeAbortedException, CorruptIndexException {
+ throws IOException {
int docCount = 0;
final int maxDoc = reader.reader.maxDoc();
final Bits liveDocs = reader.liveDocs;
@@ -309,7 +307,7 @@ public final class Lucene40StoredFieldsW
private int copyFieldsNoDeletions(MergeState mergeState, final MergeState.IndexReaderAndLiveDocs reader,
final Lucene40StoredFieldsReader matchingFieldsReader, int rawDocLengths[])
- throws IOException, MergeAbortedException, CorruptIndexException {
+ throws IOException {
final int maxDoc = reader.reader.maxDoc();
int docCount = 0;
if (matchingFieldsReader != null) {
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java Thu Jun 28 16:39:25 2012
@@ -25,7 +25,6 @@ import java.util.Map;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.TermVectorsReader;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DocsAndPositionsEnum;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.FieldInfo;
@@ -96,7 +95,7 @@ public class Lucene40TermVectorsReader e
}
public Lucene40TermVectorsReader(Directory d, SegmentInfo si, FieldInfos fieldInfos, IOContext context)
- throws CorruptIndexException, IOException {
+ throws IOException {
final String segment = si.name;
final int size = si.getDocCount();
@@ -252,7 +251,7 @@ public class Lucene40TermVectorsReader e
private int fieldUpto;
@Override
- public String next() throws IOException {
+ public String next() {
if (fieldNumbers != null && fieldUpto < fieldNumbers.length) {
return fieldInfos.fieldInfo(fieldNumbers[fieldUpto++]).name;
} else {
@@ -365,7 +364,7 @@ public class Lucene40TermVectorsReader e
private int[] endOffsets;
// NOTE: tvf is pre-positioned by caller
- public TVTermsEnum() throws IOException {
+ public TVTermsEnum() {
this.origTVF = Lucene40TermVectorsReader.this.tvf;
tvf = (IndexInput) origTVF.clone();
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java Thu Jun 28 16:39:25 2012
@@ -27,7 +27,6 @@ import org.apache.lucene.index.FieldInfo
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.Fields;
import org.apache.lucene.index.IndexFileNames;
-import org.apache.lucene.index.MergePolicy.MergeAbortedException;
import org.apache.lucene.index.MergeState;
import org.apache.lucene.index.SegmentReader;
import org.apache.lucene.store.DataInput;
@@ -284,7 +283,7 @@ public final class Lucene40TermVectorsWr
final MergeState.IndexReaderAndLiveDocs reader,
int rawDocLengths[],
int rawDocLengths2[])
- throws IOException, MergeAbortedException {
+ throws IOException {
final int maxDoc = reader.reader.maxDoc();
final Bits liveDocs = reader.liveDocs;
int totalNumDocs = 0;
@@ -337,7 +336,7 @@ public final class Lucene40TermVectorsWr
final MergeState.IndexReaderAndLiveDocs reader,
int rawDocLengths[],
int rawDocLengths2[])
- throws IOException, MergeAbortedException {
+ throws IOException {
final int maxDoc = reader.reader.maxDoc();
if (matchingVectorsReader != null) {
// We can bulk-copy because the fieldInfos are "congruent"
@@ -362,7 +361,7 @@ public final class Lucene40TermVectorsWr
}
@Override
- public void finish(FieldInfos fis, int numDocs) throws IOException {
+ public void finish(FieldInfos fis, int numDocs) {
if (HEADER_LENGTH_INDEX+((long) numDocs)*16 != tvx.getFilePointer())
// This is most likely a bug in Sun JRE 1.6.0_04/_05;
// we detect that the bug has struck, here, and
@@ -382,7 +381,7 @@ public final class Lucene40TermVectorsWr
}
@Override
- public Comparator<BytesRef> getComparator() throws IOException {
+ public Comparator<BytesRef> getComparator() {
return BytesRef.getUTF8SortedAsUnicodeComparator();
}
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Bytes.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Bytes.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Bytes.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Bytes.java Thu Jun 28 16:39:25 2012
@@ -121,14 +121,11 @@ public final class Bytes {
* {@link Type#BYTES_VAR_SORTED}.
* @param context I/O Context
* @return a new {@link Writer} instance
- * @throws IOException
- * if the files for the writer can not be created.
* @see PackedInts#getReader(org.apache.lucene.store.DataInput)
*/
public static DocValuesConsumer getWriter(Directory dir, String id, Mode mode,
boolean fixedSize, Comparator<BytesRef> sortComparator,
- Counter bytesUsed, IOContext context, float acceptableOverheadRatio)
- throws IOException {
+ Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
// TODO -- i shouldn't have to specify fixed? can
// track itself & do the write thing at write time?
if (sortComparator == null) {
@@ -244,7 +241,7 @@ public final class Bytes {
private final IOContext context;
protected BytesWriterBase(Directory dir, String id, String codecNameIdx, String codecNameDat,
- int version, Counter bytesUsed, IOContext context, Type type) throws IOException {
+ int version, Counter bytesUsed, IOContext context, Type type) {
super(bytesUsed, type);
this.id = id;
this.dir = dir;
@@ -388,21 +385,19 @@ public final class Bytes {
protected long maxBytes = 0;
protected DerefBytesWriterBase(Directory dir, String id, String codecNameIdx, String codecNameDat,
- int codecVersion, Counter bytesUsed, IOContext context, Type type)
- throws IOException {
+ int codecVersion, Counter bytesUsed, IOContext context, Type type) {
this(dir, id, codecNameIdx, codecNameDat, codecVersion, new DirectTrackingAllocator(
ByteBlockPool.BYTE_BLOCK_SIZE, bytesUsed), bytesUsed, context, PackedInts.DEFAULT, type);
}
protected DerefBytesWriterBase(Directory dir, String id, String codecNameIdx, String codecNameDat,
- int codecVersion, Counter bytesUsed, IOContext context, float acceptableOverheadRatio, Type type)
- throws IOException {
+ int codecVersion, Counter bytesUsed, IOContext context, float acceptableOverheadRatio, Type type) {
this(dir, id, codecNameIdx, codecNameDat, codecVersion, new DirectTrackingAllocator(
ByteBlockPool.BYTE_BLOCK_SIZE, bytesUsed), bytesUsed, context, acceptableOverheadRatio, type);
}
protected DerefBytesWriterBase(Directory dir, String id, String codecNameIdx, String codecNameDat, int codecVersion, Allocator allocator,
- Counter bytesUsed, IOContext context, float acceptableOverheadRatio, Type type) throws IOException {
+ Counter bytesUsed, IOContext context, float acceptableOverheadRatio, Type type) {
super(dir, id, codecNameIdx, codecNameDat, codecVersion, bytesUsed, context, type);
hash = new BytesRefHash(new ByteBlockPool(allocator),
BytesRefHash.DEFAULT_CAPACITY, new TrackingDirectBytesStartArray(
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/DirectSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/DirectSource.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/DirectSource.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/DirectSource.java Thu Jun 28 16:39:25 2012
@@ -126,7 +126,7 @@ abstract class DirectSource extends Sour
private static final class BytesToFloat extends ToNumeric {
@Override
- long toLong(IndexInput input) throws IOException {
+ long toLong(IndexInput input) {
throw new UnsupportedOperationException("ints are not supported");
}
@@ -137,7 +137,7 @@ abstract class DirectSource extends Sour
private static final class BytesToDouble extends ToNumeric {
@Override
- long toLong(IndexInput input) throws IOException {
+ long toLong(IndexInput input) {
throw new UnsupportedOperationException("ints are not supported");
}
@@ -153,7 +153,7 @@ abstract class DirectSource extends Sour
return input.readLong();
}
- double toDouble(IndexInput input) throws IOException {
+ double toDouble(IndexInput input) {
throw new UnsupportedOperationException("doubles are not supported");
}
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedDerefBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedDerefBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedDerefBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedDerefBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -46,8 +46,7 @@ class FixedDerefBytesImpl {
static final int VERSION_CURRENT = VERSION_START;
public static class Writer extends DerefBytesWriterBase {
- public Writer(Directory dir, String id, Counter bytesUsed, IOContext context)
- throws IOException {
+ public Writer(Directory dir, String id, Counter bytesUsed, IOContext context) {
super(dir, id, CODEC_NAME_IDX, CODEC_NAME_DAT, VERSION_CURRENT, bytesUsed, context, Type.BYTES_FIXED_DEREF);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedSortedBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedSortedBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedSortedBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedSortedBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -58,7 +58,7 @@ class FixedSortedBytesImpl {
private final Comparator<BytesRef> comp;
public Writer(Directory dir, String id, Comparator<BytesRef> comp,
- Counter bytesUsed, IOContext context, float acceptableOverheadRatio) throws IOException {
+ Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
super(dir, id, CODEC_NAME_IDX, CODEC_NAME_DAT, VERSION_CURRENT, bytesUsed, context, acceptableOverheadRatio, Type.BYTES_FIXED_SORTED);
this.comp = comp;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedStraightBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedStraightBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/FixedStraightBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -62,12 +62,12 @@ class FixedStraightBytesImpl {
private final ByteBlockPool pool;
protected FixedBytesWriterBase(Directory dir, String id, String codecNameDat,
- int version, Counter bytesUsed, IOContext context) throws IOException {
+ int version, Counter bytesUsed, IOContext context) {
this(dir, id, codecNameDat, version, bytesUsed, context, Type.BYTES_FIXED_STRAIGHT);
}
protected FixedBytesWriterBase(Directory dir, String id, String codecNameDat,
- int version, Counter bytesUsed, IOContext context, Type type) throws IOException {
+ int version, Counter bytesUsed, IOContext context, Type type) {
super(dir, id, null, codecNameDat, version, bytesUsed, context, type);
pool = new ByteBlockPool(new DirectTrackingAllocator(bytesUsed));
pool.nextBuffer();
@@ -140,11 +140,11 @@ class FixedStraightBytesImpl {
private boolean hasMerged;
private IndexOutput datOut;
- public Writer(Directory dir, String id, Counter bytesUsed, IOContext context) throws IOException {
+ public Writer(Directory dir, String id, Counter bytesUsed, IOContext context) {
super(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context);
}
- public Writer(Directory dir, String id, String codecNameDat, int version, Counter bytesUsed, IOContext context) throws IOException {
+ public Writer(Directory dir, String id, String codecNameDat, int version, Counter bytesUsed, IOContext context) {
super(dir, id, codecNameDat, version, bytesUsed, context);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Floats.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Floats.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Floats.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Floats.java Thu Jun 28 16:39:25 2012
@@ -47,7 +47,7 @@ public class Floats {
protected static final int VERSION_CURRENT = VERSION_START;
public static DocValuesConsumer getWriter(Directory dir, String id, Counter bytesUsed,
- IOContext context, Type type) throws IOException {
+ IOContext context, Type type) {
return new FloatsWriter(dir, id, bytesUsed, context, type);
}
@@ -72,7 +72,7 @@ public class Floats {
private final int size;
private final DocValuesArraySource template;
public FloatsWriter(Directory dir, String id, Counter bytesUsed,
- IOContext context, Type type) throws IOException {
+ IOContext context, Type type) {
super(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context);
size = typeToSize(type);
this.bytesRef = new BytesRef(size);
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Ints.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Ints.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Ints.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Ints.java Thu Jun 28 16:39:25 2012
@@ -46,7 +46,7 @@ public final class Ints {
}
public static DocValuesConsumer getWriter(Directory dir, String id, Counter bytesUsed,
- Type type, IOContext context) throws IOException {
+ Type type, IOContext context) {
return type == Type.VAR_INTS ? new PackedIntValues.PackedIntsWriter(dir, id,
bytesUsed, context) : new IntsWriter(dir, id, bytesUsed, context, type);
}
@@ -92,12 +92,12 @@ public final class Ints {
private final DocValuesArraySource template;
public IntsWriter(Directory dir, String id, Counter bytesUsed,
- IOContext context, Type valueType) throws IOException {
+ IOContext context, Type valueType) {
this(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context, valueType);
}
protected IntsWriter(Directory dir, String id, String codecName,
- int version, Counter bytesUsed, IOContext context, Type valueType) throws IOException {
+ int version, Counter bytesUsed, IOContext context, Type valueType) {
super(dir, id, codecName, version, bytesUsed, context);
size = typeToSize(valueType);
this.bytesRef = new BytesRef(size);
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/PackedIntValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/PackedIntValues.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/PackedIntValues.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/PackedIntValues.java Thu Jun 28 16:39:25 2012
@@ -57,7 +57,7 @@ class PackedIntValues {
private int lastDocId = -1;
protected PackedIntsWriter(Directory dir, String id, Counter bytesUsed,
- IOContext context) throws IOException {
+ IOContext context) {
super(dir, id, CODEC_NAME, VERSION_CURRENT, bytesUsed, context, Type.VAR_INTS);
bytesRef = new BytesRef(8);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarDerefBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarDerefBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarDerefBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarDerefBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -57,8 +57,7 @@ class VarDerefBytesImpl {
* order and merge them in a streamed fashion.
*/
static class Writer extends DerefBytesWriterBase {
- public Writer(Directory dir, String id, Counter bytesUsed, IOContext context)
- throws IOException {
+ public Writer(Directory dir, String id, Counter bytesUsed, IOContext context) {
super(dir, id, CODEC_NAME_IDX, CODEC_NAME_DAT, VERSION_CURRENT, bytesUsed, context, Type.BYTES_VAR_DEREF);
size = 0;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarSortedBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarSortedBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarSortedBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarSortedBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -60,7 +60,7 @@ final class VarSortedBytesImpl {
private final Comparator<BytesRef> comp;
public Writer(Directory dir, String id, Comparator<BytesRef> comp,
- Counter bytesUsed, IOContext context, float acceptableOverheadRatio) throws IOException {
+ Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
super(dir, id, CODEC_NAME_IDX, CODEC_NAME_DAT, VERSION_CURRENT, bytesUsed, context, acceptableOverheadRatio, Type.BYTES_VAR_SORTED);
this.comp = comp;
size = 0;
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java Thu Jun 28 16:39:25 2012
@@ -64,8 +64,7 @@ class VarStraightBytesImpl {
private final ByteBlockPool pool;
private IndexOutput datOut;
private boolean merge = false;
- public Writer(Directory dir, String id, Counter bytesUsed, IOContext context)
- throws IOException {
+ public Writer(Directory dir, String id, Counter bytesUsed, IOContext context) {
super(dir, id, CODEC_NAME_IDX, CODEC_NAME_DAT, VERSION_CURRENT, bytesUsed, context, Type.BYTES_VAR_STRAIGHT);
pool = new ByteBlockPool(new DirectTrackingAllocator(bytesUsed));
docToAddress = new long[1];
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Writer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Writer.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Writer.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/Writer.java Thu Jun 28 16:39:25 2012
@@ -83,11 +83,10 @@ abstract class Writer extends DocValuesC
* docvalues of type {@link Type#BYTES_FIXED_SORTED} and
* {@link Type#BYTES_VAR_SORTED}.
* @return a new {@link Writer} instance for the given {@link Type}
- * @throws IOException
* @see PackedInts#getReader(org.apache.lucene.store.DataInput, float)
*/
public static DocValuesConsumer create(Type type, String id, Directory directory,
- Comparator<BytesRef> comp, Counter bytesUsed, IOContext context, float acceptableOverheadRatio) throws IOException {
+ Comparator<BytesRef> comp, Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
if (comp == null) {
comp = BytesRef.getUTF8SortedAsUnicodeComparator();
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/memory/MemoryPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/memory/MemoryPostingsFormat.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/memory/MemoryPostingsFormat.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/memory/MemoryPostingsFormat.java Thu Jun 28 16:39:25 2012
@@ -427,7 +427,7 @@ public class MemoryPostingsFormat extend
}
@Override
- public int freq() throws IOException {
+ public int freq() {
assert indexOptions != IndexOptions.DOCS_ONLY;
return freq;
}
@@ -627,7 +627,7 @@ public class MemoryPostingsFormat extend
}
@Override
- public int freq() throws IOException {
+ public int freq() {
return freq;
}
}
@@ -647,7 +647,7 @@ public class MemoryPostingsFormat extend
fstEnum = new BytesRefFSTEnum<BytesRef>(fst);
}
- private void decodeMetaData() throws IOException {
+ private void decodeMetaData() {
if (!didDecode) {
buffer.reset(current.output.bytes, 0, current.output.length);
docFreq = buffer.readVInt();
@@ -696,7 +696,7 @@ public class MemoryPostingsFormat extend
}
@Override
- public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) throws IOException {
+ public DocsEnum docs(Bits liveDocs, DocsEnum reuse, boolean needsFreqs) {
decodeMetaData();
FSTDocsEnum docsEnum;
@@ -714,7 +714,7 @@ public class MemoryPostingsFormat extend
}
@Override
- public DocsAndPositionsEnum docsAndPositions(Bits liveDocs, DocsAndPositionsEnum reuse, boolean needsOffsets) throws IOException {
+ public DocsAndPositionsEnum docsAndPositions(Bits liveDocs, DocsAndPositionsEnum reuse, boolean needsOffsets) {
boolean hasOffsets = field.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
if (needsOffsets && !hasOffsets) {
@@ -757,13 +757,13 @@ public class MemoryPostingsFormat extend
}
@Override
- public int docFreq() throws IOException {
+ public int docFreq() {
decodeMetaData();
return docFreq;
}
@Override
- public long totalTermFreq() throws IOException {
+ public long totalTermFreq() {
decodeMetaData();
return totalTermFreq;
}
@@ -817,17 +817,17 @@ public class MemoryPostingsFormat extend
}
@Override
- public long getSumDocFreq() throws IOException {
+ public long getSumDocFreq() {
return sumDocFreq;
}
@Override
- public int getDocCount() throws IOException {
+ public int getDocCount() {
return docCount;
}
@Override
- public long size() throws IOException {
+ public long size() {
return termCount;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldPostingsFormat.java Thu Jun 28 16:39:25 2012
@@ -85,7 +85,7 @@ public abstract class PerFieldPostingsFo
private final SegmentWriteState segmentWriteState;
- public FieldsWriter(SegmentWriteState state) throws IOException {
+ public FieldsWriter(SegmentWriteState state) {
segmentWriteState = state;
}
@@ -206,7 +206,7 @@ public abstract class PerFieldPostingsFo
}
@Override
- public String next() throws IOException {
+ public String next() {
if (it.hasNext()) {
current = it.next();
} else {
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsReader.java Thu Jun 28 16:39:25 2012
@@ -52,7 +52,7 @@ public class PulsingPostingsReader exten
final PostingsReaderBase wrappedPostingsReader;
int maxPositions;
- public PulsingPostingsReader(PostingsReaderBase wrappedPostingsReader) throws IOException {
+ public PulsingPostingsReader(PostingsReaderBase wrappedPostingsReader) {
this.wrappedPostingsReader = wrappedPostingsReader;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsWriter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/pulsing/PulsingPostingsWriter.java Thu Jun 28 16:39:25 2012
@@ -92,7 +92,7 @@ public final class PulsingPostingsWriter
/** If the total number of positions (summed across all docs
* for this term) is <= maxPositions, then the postings are
* inlined into terms dict */
- public PulsingPostingsWriter(int maxPositions, PostingsWriterBase wrappedPostingsWriter) throws IOException {
+ public PulsingPostingsWriter(int maxPositions, PostingsWriterBase wrappedPostingsWriter) {
pending = new Position[maxPositions];
for(int i=0;i<maxPositions;i++) {
pending[i] = new Position();
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepDocValuesConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepDocValuesConsumer.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepDocValuesConsumer.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepDocValuesConsumer.java Thu Jun 28 16:39:25 2012
@@ -17,8 +17,6 @@ package org.apache.lucene.codecs.sep;
* limitations under the License.
*/
-import java.io.IOException;
-
import org.apache.lucene.codecs.lucene40.values.DocValuesWriterBase;
import org.apache.lucene.index.PerDocWriteState;
import org.apache.lucene.store.Directory;
@@ -31,7 +29,7 @@ import org.apache.lucene.store.Directory
public class SepDocValuesConsumer extends DocValuesWriterBase {
private final Directory directory;
- public SepDocValuesConsumer(PerDocWriteState state) throws IOException {
+ public SepDocValuesConsumer(PerDocWriteState state) {
super(state);
this.directory = state.directory;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldsReader.java Thu Jun 28 16:39:25 2012
@@ -105,7 +105,7 @@ class SimpleTextFieldsReader extends Fie
private boolean ended;
private final BytesRefFSTEnum<PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>>> fstEnum;
- public SimpleTextTermsEnum(FST<PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>>> fst, IndexOptions indexOptions) throws IOException {
+ public SimpleTextTermsEnum(FST<PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>>> fst, IndexOptions indexOptions) {
this.indexOptions = indexOptions;
fstEnum = new BytesRefFSTEnum<PairOutputs.Pair<Long,PairOutputs.Pair<Long,Long>>>(fst);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextLiveDocsFormat.java Thu Jun 28 16:39:25 2012
@@ -99,7 +99,7 @@ public class SimpleTextLiveDocsFormat ex
}
}
- private int parseIntAt(BytesRef bytes, int offset, CharsRef scratch) throws IOException {
+ private int parseIntAt(BytesRef bytes, int offset, CharsRef scratch) {
UnicodeUtil.UTF8toUTF16(bytes.bytes, bytes.offset+offset, bytes.length-offset, scratch);
return ArrayUtil.parseInt(scratch.chars, 0, scratch.length);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsFormat.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsFormat.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextNormsFormat.java Thu Jun 28 16:39:25 2012
@@ -95,8 +95,7 @@ public class SimpleTextNormsFormat exten
public static class SimpleTextNormsPerDocConsumer extends
SimpleTextPerDocConsumer {
- public SimpleTextNormsPerDocConsumer(PerDocWriteState state)
- throws IOException {
+ public SimpleTextNormsPerDocConsumer(PerDocWriteState state) {
super(state, NORMS_SEG_SUFFIX);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextPerDocConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextPerDocConsumer.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextPerDocConsumer.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextPerDocConsumer.java Thu Jun 28 16:39:25 2012
@@ -32,8 +32,7 @@ class SimpleTextPerDocConsumer extends P
protected final PerDocWriteState state;
protected final String segmentSuffix;
- public SimpleTextPerDocConsumer(PerDocWriteState state, String segmentSuffix)
- throws IOException {
+ public SimpleTextPerDocConsumer(PerDocWriteState state, String segmentSuffix) {
this.state = state;
this.segmentSuffix = segmentSuffix;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextStoredFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextStoredFieldsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextStoredFieldsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextStoredFieldsReader.java Thu Jun 28 16:39:25 2012
@@ -21,7 +21,6 @@ import java.io.IOException;
import java.util.ArrayList;
import org.apache.lucene.codecs.StoredFieldsReader;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexFileNames;
@@ -88,7 +87,7 @@ public class SimpleTextStoredFieldsReade
}
@Override
- public void visitDocument(int n, StoredFieldVisitor visitor) throws CorruptIndexException, IOException {
+ public void visitDocument(int n, StoredFieldVisitor visitor) throws IOException {
in.seek(offsets.get(n));
readLine();
assert StringHelper.startsWith(scratch, NUM);
@@ -181,7 +180,7 @@ public class SimpleTextStoredFieldsReade
SimpleTextUtil.readLine(in, scratch);
}
- private int parseIntAt(int offset) throws IOException {
+ private int parseIntAt(int offset) {
UnicodeUtil.UTF8toUTF16(scratch.bytes, scratch.offset+offset, scratch.length-offset, scratchUTF16);
return ArrayUtil.parseInt(scratchUTF16.chars, 0, scratchUTF16.length);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java Thu Jun 28 16:39:25 2012
@@ -204,7 +204,7 @@ public class SimpleTextTermVectorsReader
SimpleTextUtil.readLine(in, scratch);
}
- private int parseIntAt(int offset) throws IOException {
+ private int parseIntAt(int offset) {
UnicodeUtil.UTF8toUTF16(scratch.bytes, scratch.offset+offset, scratch.length-offset, scratchUTF16);
return ArrayUtil.parseInt(scratchUTF16.chars, 0, scratchUTF16.length);
}
@@ -217,7 +217,7 @@ public class SimpleTextTermVectorsReader
private class SimpleTVFields extends Fields {
private final SortedMap<String,SimpleTVTerms> fields;
- SimpleTVFields(SortedMap<String,SimpleTVTerms> fields) throws IOException {
+ SimpleTVFields(SortedMap<String,SimpleTVTerms> fields) {
this.fields = fields;
}
@@ -228,7 +228,7 @@ public class SimpleTextTermVectorsReader
private Map.Entry<String,SimpleTVTerms> current = null;
@Override
- public String next() throws IOException {
+ public String next() {
if (!iterator.hasNext()) {
return null;
} else {
@@ -238,7 +238,7 @@ public class SimpleTextTermVectorsReader
}
@Override
- public Terms terms() throws IOException {
+ public Terms terms() {
return current.getValue();
}
};
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/document/Field.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/document/Field.java Thu Jun 28 16:39:25 2012
@@ -469,7 +469,7 @@ public class Field implements IndexableF
boolean used;
@Override
- public boolean incrementToken() throws IOException {
+ public boolean incrementToken() {
if (used) {
return false;
}
@@ -480,7 +480,7 @@ public class Field implements IndexableF
}
@Override
- public void reset() throws IOException {
+ public void reset() {
used = false;
}
};
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/AutomatonTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/AutomatonTermsEnum.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/AutomatonTermsEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/AutomatonTermsEnum.java Thu Jun 28 16:39:25 2012
@@ -75,7 +75,7 @@ class AutomatonTermsEnum extends Filtere
* <p>
* @param compiled CompiledAutomaton
*/
- public AutomatonTermsEnum(TermsEnum tenum, CompiledAutomaton compiled) throws IOException {
+ public AutomatonTermsEnum(TermsEnum tenum, CompiledAutomaton compiled) {
super(tenum);
this.finite = compiled.finite;
this.runAutomaton = compiled.runAutomaton;
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java Thu Jun 28 16:39:25 2012
@@ -67,7 +67,7 @@ public abstract class BaseCompositeReade
* cloned and not protected for modification, the subclass is responsible
* to do this.
*/
- protected BaseCompositeReader(R[] subReaders) throws IOException {
+ protected BaseCompositeReader(R[] subReaders) {
this.subReaders = subReaders;
this.subReadersList = Collections.unmodifiableList(Arrays.asList(subReaders));
starts = new int[subReaders.length + 1]; // build starts array
@@ -112,7 +112,7 @@ public abstract class BaseCompositeReade
}
@Override
- public final void document(int docID, StoredFieldVisitor visitor) throws CorruptIndexException, IOException {
+ public final void document(int docID, StoredFieldVisitor visitor) throws IOException {
ensureOpen();
final int i = readerIndex(docID); // find subreader num
subReaders[i].document(docID - starts[i], visitor); // dispatch to subreader
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java Thu Jun 28 16:39:25 2012
@@ -398,7 +398,7 @@ public class ConcurrentMergeScheduler ex
MergePolicy.OneMerge runningMerge;
private volatile boolean done;
- public MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge) throws IOException {
+ public MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge) {
this.tWriter = writer;
this.startMerge = startMerge;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java Thu Jun 28 16:39:25 2012
@@ -56,10 +56,9 @@ public abstract class DirectoryReader ex
/** Returns a IndexReader reading the index in the given
* Directory
* @param directory the index directory
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
- public static DirectoryReader open(final Directory directory) throws CorruptIndexException, IOException {
+ public static DirectoryReader open(final Directory directory) throws IOException {
return StandardDirectoryReader.open(directory, null, DEFAULT_TERMS_INDEX_DIVISOR);
}
@@ -76,10 +75,9 @@ public abstract class DirectoryReader ex
* memory usage, at the expense of higher latency when
* loading a TermInfo. The default value is 1. Set this
* to -1 to skip loading the terms index entirely.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
- public static DirectoryReader open(final Directory directory, int termInfosIndexDivisor) throws CorruptIndexException, IOException {
+ public static DirectoryReader open(final Directory directory, int termInfosIndexDivisor) throws IOException {
return StandardDirectoryReader.open(directory, null, termInfosIndexDivisor);
}
@@ -102,17 +100,16 @@ public abstract class DirectoryReader ex
*
* @lucene.experimental
*/
- public static DirectoryReader open(final IndexWriter writer, boolean applyAllDeletes) throws CorruptIndexException, IOException {
+ public static DirectoryReader open(final IndexWriter writer, boolean applyAllDeletes) throws IOException {
return writer.getReader(applyAllDeletes);
}
/** Expert: returns an IndexReader reading the index in the given
* {@link IndexCommit}.
* @param commit the commit point to open
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
- public static DirectoryReader open(final IndexCommit commit) throws CorruptIndexException, IOException {
+ public static DirectoryReader open(final IndexCommit commit) throws IOException {
return StandardDirectoryReader.open(commit.getDirectory(), commit, DEFAULT_TERMS_INDEX_DIVISOR);
}
@@ -129,10 +126,9 @@ public abstract class DirectoryReader ex
* memory usage, at the expense of higher latency when
* loading a TermInfo. The default value is 1. Set this
* to -1 to skip loading the terms index entirely.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
- public static DirectoryReader open(final IndexCommit commit, int termInfosIndexDivisor) throws CorruptIndexException, IOException {
+ public static DirectoryReader open(final IndexCommit commit, int termInfosIndexDivisor) throws IOException {
return StandardDirectoryReader.open(commit.getDirectory(), commit, termInfosIndexDivisor);
}
@@ -311,9 +307,8 @@ public abstract class DirectoryReader ex
* Returns <code>true</code> if an index exists at the specified directory.
* @param directory the directory to check for an index
* @return <code>true</code> if an index exists; <code>false</code> otherwise
- * @throws IOException if there is a problem with accessing the index
*/
- public static boolean indexExists(Directory directory) throws IOException {
+ public static boolean indexExists(Directory directory) {
try {
new SegmentInfos().read(directory);
return true;
@@ -331,7 +326,7 @@ public abstract class DirectoryReader ex
* Subclasses of {@code DirectoryReader} should take care to not allow
* modification of this internal array, e.g. {@link #doOpenIfChanged()}.
*/
- protected DirectoryReader(Directory directory, AtomicReader[] segmentReaders) throws CorruptIndexException, IOException {
+ protected DirectoryReader(Directory directory, AtomicReader[] segmentReaders) {
super(segmentReaders);
this.directory = directory;
}
@@ -348,32 +343,29 @@ public abstract class DirectoryReader ex
* If this reader does not support reopen, return {@code null}, so
* client code is happy. This should be consistent with {@link #isCurrent}
* (should always return {@code true}) if reopen is not supported.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
* @return null if there are no changes; else, a new
* DirectoryReader instance.
*/
- protected abstract DirectoryReader doOpenIfChanged() throws CorruptIndexException, IOException;
+ protected abstract DirectoryReader doOpenIfChanged() throws IOException;
/** Implement this method to support {@link #openIfChanged(DirectoryReader,IndexCommit)}.
* If this reader does not support reopen from a specific {@link IndexCommit},
* throw {@link UnsupportedOperationException}.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
* @return null if there are no changes; else, a new
* DirectoryReader instance.
*/
- protected abstract DirectoryReader doOpenIfChanged(final IndexCommit commit) throws CorruptIndexException, IOException;
+ protected abstract DirectoryReader doOpenIfChanged(final IndexCommit commit) throws IOException;
/** Implement this method to support {@link #openIfChanged(DirectoryReader,IndexWriter,boolean)}.
* If this reader does not support reopen from {@link IndexWriter},
* throw {@link UnsupportedOperationException}.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
* @return null if there are no changes; else, a new
* DirectoryReader instance.
*/
- protected abstract DirectoryReader doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) throws CorruptIndexException, IOException;
+ protected abstract DirectoryReader doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes) throws IOException;
/**
* Version number when this IndexReader was opened.
@@ -407,16 +399,15 @@ public abstract class DirectoryReader ex
* {@link #openIfChanged} to get a new reader that sees the
* changes.</p>
*
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
- public abstract boolean isCurrent() throws CorruptIndexException, IOException;
+ public abstract boolean isCurrent() throws IOException;
/**
* Expert: return the IndexCommit that this reader has opened.
* <p/>
* @lucene.experimental
*/
- public abstract IndexCommit getIndexCommit() throws CorruptIndexException, IOException;
+ public abstract IndexCommit getIndexCommit() throws IOException;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocTermOrds.java Thu Jun 28 16:39:25 2012
@@ -175,7 +175,7 @@ public class DocTermOrds {
/** Subclass inits w/ this, but be sure you then call
* uninvert, only once */
- protected DocTermOrds(String field, int maxTermDocFreq, int indexIntervalBits) throws IOException {
+ protected DocTermOrds(String field, int maxTermDocFreq, int indexIntervalBits) {
//System.out.println("DTO init field=" + field + " maxTDFreq=" + maxTermDocFreq);
this.field = field;
this.maxTermDocFreq = maxTermDocFreq;
@@ -703,7 +703,7 @@ public class DocTermOrds {
}
@Override
- public long ord() throws IOException {
+ public long ord() {
return ordBase + ord;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java Thu Jun 28 16:39:25 2012
@@ -134,7 +134,7 @@ final class DocumentsWriter {
final Codec codec;
DocumentsWriter(Codec codec, LiveIndexWriterConfig config, Directory directory, IndexWriter writer, FieldNumbers globalFieldNumbers,
- BufferedDeletesStream bufferedDeletesStream) throws IOException {
+ BufferedDeletesStream bufferedDeletesStream) {
this.codec = codec;
this.directory = directory;
this.indexWriter = writer;
@@ -200,7 +200,7 @@ final class DocumentsWriter {
* updating the index files) and must discard all
* currently buffered docs. This resets our state,
* discarding any docs added since last flush. */
- synchronized void abort() throws IOException {
+ synchronized void abort() {
boolean success = false;
synchronized (this) {
deleteQueue.clear();
@@ -219,8 +219,6 @@ final class DocumentsWriter {
if (perThread.isActive()) { // we might be closed
try {
perThread.dwpt.abort();
- } catch (IOException ex) {
- // continue
} finally {
perThread.dwpt.checkAndResetHasAborted();
flushControl.doOnAbort(perThread);
@@ -276,7 +274,7 @@ final class DocumentsWriter {
flushControl.setClosed();
}
- private boolean preUpdate() throws CorruptIndexException, IOException {
+ private boolean preUpdate() throws IOException {
ensureOpen();
boolean maybeMerge = false;
if (flushControl.anyStalledThreads() || flushControl.numQueuedFlushes() > 0) {
@@ -325,7 +323,7 @@ final class DocumentsWriter {
}
boolean updateDocuments(final Iterable<? extends Iterable<? extends IndexableField>> docs, final Analyzer analyzer,
- final Term delTerm) throws CorruptIndexException, IOException {
+ final Term delTerm) throws IOException {
boolean maybeMerge = preUpdate();
final ThreadState perThread = flushControl.obtainAndLock();
@@ -356,7 +354,7 @@ final class DocumentsWriter {
}
boolean updateDocument(final Iterable<? extends IndexableField> doc, final Analyzer analyzer,
- final Term delTerm) throws CorruptIndexException, IOException {
+ final Term delTerm) throws IOException {
boolean maybeMerge = preUpdate();
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java Thu Jun 28 16:39:25 2012
@@ -16,7 +16,7 @@ package org.apache.lucene.index;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import java.io.IOException;
+
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;
@@ -570,21 +570,13 @@ final class DocumentsWriterFlushControl
try {
for (DocumentsWriterPerThread dwpt : flushQueue) {
doAfterFlush(dwpt);
- try {
- dwpt.abort();
- } catch (IOException ex) {
- // continue
- }
+ dwpt.abort();
}
for (BlockedFlush blockedFlush : blockedFlushes) {
flushingWriters
.put(blockedFlush.dwpt, Long.valueOf(blockedFlush.bytes));
doAfterFlush(blockedFlush.dwpt);
- try {
- blockedFlush.dwpt.abort();
- } catch (IOException ex) {
- // continue
- }
+ blockedFlush.dwpt.abort();
}
} finally {
fullFlush = false;
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java Thu Jun 28 16:39:25 2012
@@ -135,7 +135,7 @@ class DocumentsWriterPerThread {
* updating the index files) and must discard all
* currently buffered docs. This resets our state,
* discarding any docs added since last flush. */
- void abort() throws IOException {
+ void abort() {
hasAborted = aborting = true;
try {
if (infoStream.isEnabled("DWPT")) {
@@ -352,7 +352,7 @@ class DocumentsWriterPerThread {
return docCount;
}
- private void finishDocument(Term delTerm) throws IOException {
+ private void finishDocument(Term delTerm) {
/*
* here we actually finish the document in two steps 1. push the delete into
* the queue and update our slice. 2. increment the DWPT private document
@@ -412,7 +412,7 @@ class DocumentsWriterPerThread {
}
/** Reset after a flush */
- private void doAfterFlush() throws IOException {
+ private void doAfterFlush() {
segmentInfo = null;
consumer.doAfterFlush();
directory.getCreatedFiles().clear();
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java Thu Jun 28 16:39:25 2012
@@ -348,7 +348,7 @@ public class FilterAtomicReader extends
}
@Override
- public void document(int docID, StoredFieldVisitor visitor) throws CorruptIndexException, IOException {
+ public void document(int docID, StoredFieldVisitor visitor) throws IOException {
ensureOpen();
in.document(docID, visitor);
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java Thu Jun 28 16:39:25 2012
@@ -82,7 +82,7 @@ public abstract class FilteredTermsEnum
* <P>You can only use this method, if you keep the default
* implementation of {@link #nextSeekTerm}.
*/
- protected final void setInitialSeekTerm(BytesRef term) throws IOException {
+ protected final void setInitialSeekTerm(BytesRef term) {
this.initialSeekTerm = term;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriter.java Thu Jun 28 16:39:25 2012
@@ -114,10 +114,10 @@ final class FreqProxTermsWriter extends
}
@Override
- void finishDocument(TermsHash termsHash) throws IOException {
+ void finishDocument(TermsHash termsHash) {
}
@Override
- void startDocument() throws IOException {
+ void startDocument() {
}
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FreqProxTermsWriterPerField.java Thu Jun 28 16:39:25 2012
@@ -76,7 +76,7 @@ final class FreqProxTermsWriterPerField
boolean hasPayloads;
@Override
- void skippingLongTerm() throws IOException {}
+ void skippingLongTerm() {}
public int compareTo(FreqProxTermsWriterPerField other) {
return fieldInfo.name.compareTo(other.fieldInfo.name);
@@ -326,7 +326,7 @@ final class FreqProxTermsWriterPerField
* instances) found in this field and serialize them
* into a single RAM segment. */
void flush(String fieldName, FieldsConsumer consumer, final SegmentWriteState state)
- throws CorruptIndexException, IOException {
+ throws IOException {
if (!fieldInfo.isIndexed()) {
return; // nothing to flush, don't bother the codec with the unindexed field
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java Thu Jun 28 16:39:25 2012
@@ -118,11 +118,10 @@ final class IndexFileDeleter {
* the Directory, incref the files they reference, call
* the policy to let it delete commits. This will remove
* any files not referenced by any of the commits.
- * @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
*/
public IndexFileDeleter(Directory directory, IndexDeletionPolicy policy, SegmentInfos segmentInfos,
- InfoStream infoStream, IndexWriter writer) throws CorruptIndexException, IOException {
+ InfoStream infoStream, IndexWriter writer) throws IOException {
this.infoStream = infoStream;
this.writer = writer;
@@ -469,14 +468,14 @@ final class IndexFileDeleter {
}
}
- void incRef(Collection<String> files) throws IOException {
+ void incRef(Collection<String> files) {
assert locked();
for(final String file : files) {
incRef(file);
}
}
- void incRef(String fileName) throws IOException {
+ void incRef(String fileName) {
assert locked();
RefCount rc = getRefCount(fileName);
if (infoStream.isEnabled("IFD")) {
@@ -661,7 +660,7 @@ final class IndexFileDeleter {
}
@Override
- public Collection<String> getFileNames() throws IOException {
+ public Collection<String> getFileNames() {
return files;
}
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexReader.java?rev=1355069&r1=1355068&r2=1355069&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexReader.java Thu Jun 28 16:39:25 2012
@@ -28,7 +28,7 @@ import java.util.concurrent.atomic.Atomi
import org.apache.lucene.document.Document;
import org.apache.lucene.document.DocumentStoredFieldVisitor;
import org.apache.lucene.search.SearcherManager; // javadocs
-import org.apache.lucene.store.*;
+import org.apache.lucene.store.AlreadyClosedException;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
@@ -316,7 +316,7 @@ public abstract class IndexReader implem
* simply want to load all fields, use {@link
* #document(int)}. If you want to load a subset, use
* {@link DocumentStoredFieldVisitor}. */
- public abstract void document(int docID, StoredFieldVisitor visitor) throws CorruptIndexException, IOException;
+ public abstract void document(int docID, StoredFieldVisitor visitor) throws IOException;
/**
* Returns the stored fields of the <code>n</code><sup>th</sup>
@@ -340,7 +340,7 @@ public abstract class IndexReader implem
// TODO: we need a separate StoredField, so that the
// Document returned here contains that class not
// IndexableField
- public final Document document(int docID) throws CorruptIndexException, IOException {
+ public final Document document(int docID) throws IOException {
final DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor();
document(docID, visitor);
return visitor.getDocument();
@@ -351,7 +351,7 @@ public abstract class IndexReader implem
* fields. Note that this is simply sugar for {@link
* DocumentStoredFieldVisitor#DocumentStoredFieldVisitor(Set)}.
*/
- public final Document document(int docID, Set<String> fieldsToLoad) throws CorruptIndexException, IOException {
+ public final Document document(int docID, Set<String> fieldsToLoad) throws IOException {
final DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor(fieldsToLoad);
document(docID, visitor);
return visitor.getDocument();