lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1212994 - /lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
Date Sun, 11 Dec 2011 11:25:06 GMT
Author: uschindler
Date: Sun Dec 11 11:25:06 2011
New Revision: 1212994

URL: http://svn.apache.org/viewvc?rev=1212994&view=rev
Log:
Remove invalid use of Exception for something it was not intended to

Modified:
    lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java

Modified: lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java?rev=1212994&r1=1212993&r2=1212994&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
(original)
+++ lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
Sun Dec 11 11:25:06 2011
@@ -23,7 +23,6 @@ import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.index.FieldsEnum;
 import org.apache.lucene.index.Terms;
-import org.apache.lucene.index.FieldReaderException;
 import org.apache.lucene.index.DocsEnum;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.store.FSDirectory;
@@ -117,7 +116,7 @@ public class HighFreqTerms {
     if (field != null) {
       Fields fields = MultiFields.getFields(reader);
       if (fields == null) {
-        throw new FieldReaderException("field " + field + " not found");
+        throw new RuntimeException("field " + field + " not found");
       }
       Terms terms = fields.terms(field);
       if (terms != null) {
@@ -128,7 +127,7 @@ public class HighFreqTerms {
     } else {
       Fields fields = MultiFields.getFields(reader);
       if (fields == null) {
-        throw new FieldReaderException("no fields found for this index");
+        throw new RuntimeException("no fields found for this index");
       }
       tiq = new TermStatsQueue(numTerms);
       FieldsEnum fieldsEnum = fields.iterator();



Mime
View raw message