lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index TermInfosReader.java SegmentReader.java MultipleTermPositions.java MultiReader.java SegmentTermDocs.java
Date Fri, 06 Aug 2004 20:50:29 GMT
dnaber      2004/08/06 13:50:29

  Modified:    src/java/org/apache/lucene/index TermInfosReader.java
                        SegmentReader.java MultipleTermPositions.java
                        MultiReader.java SegmentTermDocs.java
  Log:
  remove "throws IOException" from methods that really never throw this exception
  
  Revision  Changes    Path
  1.9       +1 -1      jakarta-lucene/src/java/org/apache/lucene/index/TermInfosReader.java
  
  Index: TermInfosReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/TermInfosReader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TermInfosReader.java	14 Jun 2004 00:15:24 -0000	1.8
  +++ TermInfosReader.java	6 Aug 2004 20:50:29 -0000	1.9
  @@ -94,7 +94,7 @@
     }
   
     /** 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;
   
  
  
  
  1.24      +8 -10     jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java
  
  Index: SegmentReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentReader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- SegmentReader.java	10 Jul 2004 06:19:01 -0000	1.23
  +++ SegmentReader.java	6 Aug 2004 20:50:29 -0000	1.24
  @@ -188,7 +188,7 @@
       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 @@
       deletedDocs.set(docNum);
     }
   
  -  protected final void doUndeleteAll() throws IOException {
  +  protected final void doUndeleteAll() {
         deletedDocs = null;
         deletedDocsDirty = false;
         undeleteAll = true;
  @@ -222,7 +222,7 @@
       return files;
     }
   
  -  public final TermEnum terms() throws IOException {
  +  public final TermEnum terms() {
       return tis.terms();
     }
   
  @@ -271,7 +271,7 @@
     /**
      * @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 @@
     /**
      * @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 @@
      *  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 @@
      *  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;
   
  
  
  
  1.5       +0 -2      jakarta-lucene/src/java/org/apache/lucene/index/MultipleTermPositions.java
  
  Index: MultipleTermPositions.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/MultipleTermPositions.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MultipleTermPositions.java	29 Mar 2004 22:48:02 -0000	1.4
  +++ MultipleTermPositions.java	6 Aug 2004 20:50:29 -0000	1.5
  @@ -178,11 +178,9 @@
        * 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();
       }
  
  
  
  1.8       +3 -4      jakarta-lucene/src/java/org/apache/lucene/index/MultiReader.java
  
  Index: MultiReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/MultiReader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MultiReader.java	17 May 2004 12:56:47 -0000	1.7
  +++ MultiReader.java	6 Aug 2004 20:50:29 -0000	1.8
  @@ -52,13 +52,12 @@
     }
   
     /** 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++) {
  
  
  
  1.14      +1 -2      jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
  
  Index: SegmentTermDocs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SegmentTermDocs.java	14 Jun 2004 00:15:24 -0000	1.13
  +++ SegmentTermDocs.java	6 Aug 2004 20:50:29 -0000	1.14
  @@ -39,8 +39,7 @@
     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;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message