mirror of
https://github.com/apache/lucene.git
synced 2025-02-07 10:38:40 +00:00
remove "throws IOException" from methods that really never throw this exception
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150400 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ab798c960e
commit
c122d5bf3f
@ -52,13 +52,12 @@ public class MultiReader extends IndexReader {
|
||||
}
|
||||
|
||||
/** Construct reading the named set of readers. */
|
||||
MultiReader(Directory directory, SegmentInfos sis, boolean closeDirectory, IndexReader[] subReaders)
|
||||
throws IOException {
|
||||
MultiReader(Directory directory, SegmentInfos sis, boolean closeDirectory, IndexReader[] subReaders) {
|
||||
super(directory, sis, closeDirectory);
|
||||
initialize(subReaders);
|
||||
}
|
||||
|
||||
private void initialize(IndexReader[] subReaders) throws IOException{
|
||||
private void initialize(IndexReader[] subReaders) {
|
||||
this.subReaders = subReaders;
|
||||
starts = new int[subReaders.length + 1]; // build starts array
|
||||
for (int i = 0; i < subReaders.length; i++) {
|
||||
|
@ -178,11 +178,9 @@ public class MultipleTermPositions
|
||||
* Describe <code>nextPosition</code> method here.
|
||||
*
|
||||
* @return an <code>int</code> value
|
||||
* @exception IOException if an error occurs
|
||||
* @see TermPositions#nextPosition()
|
||||
*/
|
||||
public final int nextPosition()
|
||||
throws IOException
|
||||
{
|
||||
return _posList.next();
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ final class SegmentReader extends IndexReader {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected final void doDelete(int docNum) throws IOException {
|
||||
protected final void doDelete(int docNum) {
|
||||
if (deletedDocs == null)
|
||||
deletedDocs = new BitVector(maxDoc());
|
||||
deletedDocsDirty = true;
|
||||
@ -196,7 +196,7 @@ final class SegmentReader extends IndexReader {
|
||||
deletedDocs.set(docNum);
|
||||
}
|
||||
|
||||
protected final void doUndeleteAll() throws IOException {
|
||||
protected final void doUndeleteAll() {
|
||||
deletedDocs = null;
|
||||
deletedDocsDirty = false;
|
||||
undeleteAll = true;
|
||||
@ -222,7 +222,7 @@ final class SegmentReader extends IndexReader {
|
||||
return files;
|
||||
}
|
||||
|
||||
public final TermEnum terms() throws IOException {
|
||||
public final TermEnum terms() {
|
||||
return tis.terms();
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ final class SegmentReader extends IndexReader {
|
||||
/**
|
||||
* @see IndexReader#getFieldNames()
|
||||
*/
|
||||
public Collection getFieldNames() throws IOException {
|
||||
public Collection getFieldNames() {
|
||||
// maintain a unique set of field names
|
||||
Set fieldSet = new HashSet();
|
||||
for (int i = 0; i < fieldInfos.size(); i++) {
|
||||
@ -284,7 +284,7 @@ final class SegmentReader extends IndexReader {
|
||||
/**
|
||||
* @see IndexReader#getFieldNames(boolean)
|
||||
*/
|
||||
public Collection getFieldNames(boolean indexed) throws IOException {
|
||||
public Collection getFieldNames(boolean indexed) {
|
||||
// maintain a unique set of field names
|
||||
Set fieldSet = new HashSet();
|
||||
for (int i = 0; i < fieldInfos.size(); i++) {
|
||||
@ -386,8 +386,7 @@ final class SegmentReader extends IndexReader {
|
||||
* the specified field of this document, if the field had storeTermVector
|
||||
* flag set. If the flag was not set, the method returns null.
|
||||
*/
|
||||
public TermFreqVector getTermFreqVector(int docNumber, String field)
|
||||
throws IOException {
|
||||
public TermFreqVector getTermFreqVector(int docNumber, String field) {
|
||||
// Check if this field is invalid or has no stored term vector
|
||||
FieldInfo fi = fieldInfos.fieldInfo(field);
|
||||
if (fi == null || !fi.storeTermVector) return null;
|
||||
@ -402,8 +401,7 @@ final class SegmentReader extends IndexReader {
|
||||
* in a given vectorized field.
|
||||
* If no such fields existed, the method returns null.
|
||||
*/
|
||||
public TermFreqVector[] getTermFreqVectors(int docNumber)
|
||||
throws IOException {
|
||||
public TermFreqVector[] getTermFreqVectors(int docNumber) {
|
||||
if (termVectorsReader == null)
|
||||
return null;
|
||||
|
||||
|
@ -39,8 +39,7 @@ class SegmentTermDocs implements TermDocs {
|
||||
private long skipPointer;
|
||||
private boolean haveSkipped;
|
||||
|
||||
SegmentTermDocs(SegmentReader parent)
|
||||
throws IOException {
|
||||
SegmentTermDocs(SegmentReader parent) {
|
||||
this.parent = parent;
|
||||
this.freqStream = (InputStream) parent.freqStream.clone();
|
||||
this.deletedDocs = parent.deletedDocs;
|
||||
|
@ -94,7 +94,7 @@ final class TermInfosReader {
|
||||
}
|
||||
|
||||
/** Returns the offset of the greatest index entry which is less than or equal to term.*/
|
||||
private final int getIndexOffset(Term term) throws IOException {
|
||||
private final int getIndexOffset(Term term) {
|
||||
int lo = 0; // binary search indexTerms[]
|
||||
int hi = indexTerms.length - 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user