don't declare Exceptions that are never thrown; remove an unused variable

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@168450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2005-05-05 22:37:09 +00:00
parent c97ba92ebd
commit a20246c68c
6 changed files with 13 additions and 14 deletions

View File

@ -365,7 +365,7 @@ final class SegmentMerger {
private long lastSkipFreqPointer;
private long lastSkipProxPointer;
private void resetSkip() throws IOException {
private void resetSkip() {
skipBuffer.reset();
lastSkipDoc = 0;
lastSkipFreqPointer = freqOutput.getFilePointer();

View File

@ -130,7 +130,7 @@ public class MultiPhraseQuery extends Query {
public Query getQuery() { return MultiPhraseQuery.this; }
public float getValue() { return value; }
public float sumOfSquaredWeights() throws IOException {
public float sumOfSquaredWeights() {
queryWeight = idf * getBoost(); // compute query weight
return queryWeight * queryWeight; // square it
}

View File

@ -56,7 +56,7 @@ public class MultiSearcher extends Searcher {
return df;
}
public int[] docFreqs(Term[] terms) throws IOException {
public int[] docFreqs(Term[] terms) {
int[] result = new int[terms.length];
for (int i = 0; i < terms.length; i++) {
result[i] = docFreq(terms[i]);
@ -68,7 +68,7 @@ public class MultiSearcher extends Searcher {
return maxDoc;
}
public Query rewrite(Query query) throws IOException {
public Query rewrite(Query query) {
// this is a bit of a hack. We know that a query which
// creates a Weight based on this Dummy-Searcher is
// always already rewritten (see preparedWeight()).
@ -76,27 +76,27 @@ public class MultiSearcher extends Searcher {
return query;
}
public void close() throws IOException {
public void close() {
throw new UnsupportedOperationException();
}
public Document doc(int i) throws IOException{
public Document doc(int i) {
throw new UnsupportedOperationException();
}
public Explanation explain(Weight weight,int doc) throws IOException {
public Explanation explain(Weight weight,int doc) {
throw new UnsupportedOperationException();
}
public void search(Weight weight, Filter filter, HitCollector results) throws IOException {
public void search(Weight weight, Filter filter, HitCollector results) {
throw new UnsupportedOperationException();
}
public TopDocs search(Weight weight,Filter filter,int n) throws IOException {
public TopDocs search(Weight weight,Filter filter,int n) {
throw new UnsupportedOperationException();
}
public TopFieldDocs search(Weight weight,Filter filter,int n,Sort sort) throws IOException {
public TopFieldDocs search(Weight weight,Filter filter,int n,Sort sort) {
throw new UnsupportedOperationException();
}
};

View File

@ -131,7 +131,7 @@ public class PhrasePrefixQuery extends Query {
public Query getQuery() { return PhrasePrefixQuery.this; }
public float getValue() { return value; }
public float sumOfSquaredWeights() throws IOException {
public float sumOfSquaredWeights() {
queryWeight = idf * getBoost(); // compute query weight
return queryWeight * queryWeight; // square it
}

View File

@ -119,7 +119,7 @@ public class PhraseQuery extends Query {
public Query getQuery() { return PhraseQuery.this; }
public float getValue() { return value; }
public float sumOfSquaredWeights() throws IOException {
public float sumOfSquaredWeights() {
queryWeight = idf * getBoost(); // compute query weight
return queryWeight * queryWeight; // square it
}

View File

@ -31,7 +31,6 @@ public class TermQuery extends Query {
private class TermWeight implements Weight {
private Similarity similarity;
private Searcher searcher;
private float value;
private float idf;
private float queryNorm;
@ -48,7 +47,7 @@ public class TermQuery extends Query {
public Query getQuery() { return TermQuery.this; }
public float getValue() { return value; }
public float sumOfSquaredWeights() throws IOException {
public float sumOfSquaredWeights() {
queryWeight = idf * getBoost(); // compute query weight
return queryWeight * queryWeight; // square it
}