lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r718537 - in /lucene/java/trunk/src/java/org/apache/lucene/index: FieldInfo.java FieldInfos.java
Date Tue, 18 Nov 2008 09:53:14 GMT
Author: mikemccand
Date: Tue Nov 18 01:53:13 2008
New Revision: 718537

URL: http://svn.apache.org/viewvc?rev=718537&view=rev
Log:
LUCENE-1456: remove buggy but unused dead code in FieldInfo

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfo.java
    lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfos.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfo.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfo.java?rev=718537&r1=718536&r2=718537&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfo.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfo.java Tue Nov 18 01:53:13
2008
@@ -75,28 +75,4 @@
       this.storePayloads = true;
     }
   }
-
-  void update(FieldInfo other) {
-    if (isIndexed != other.isIndexed) {
-      isIndexed = true;                      // once indexed, always index
-    }
-    if (storeTermVector != other.storeTermVector) {
-      storeTermVector = true;                // once vector, always vector
-    }
-    if (storePositionWithTermVector != other.storePositionWithTermVector) {
-      storePositionWithTermVector = true;                // once vector, always vector
-    }
-    if (storeOffsetWithTermVector != other.storeOffsetWithTermVector) {
-      storeOffsetWithTermVector = true;                // once vector, always vector
-    }
-    if (omitNorms != other.omitNorms) {
-      omitNorms = false;                // once norms are stored, always store
-    }
-    if (this.omitTf != omitTf) {
-      this.omitTf = true;                // if one require omitTf at least once, it remains
off for life
-    }
-    if (storePayloads != other.storePayloads) {
-      storePayloads = true;
-    }
-  }
 }

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfos.java?rev=718537&r1=718536&r2=718537&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfos.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/FieldInfos.java Tue Nov 18 01:53:13
2008
@@ -211,18 +211,6 @@
     return fi;
   }
 
-  synchronized public FieldInfo add(FieldInfo fieldInfo) {
-    FieldInfo fi = fieldInfo(fieldInfo.name);
-    if (fi == null) {
-      return addInternal(fieldInfo.name, fieldInfo.isIndexed, fieldInfo.storeTermVector,
-                         fieldInfo.storePositionWithTermVector, fieldInfo.storeOffsetWithTermVector,
-                         fieldInfo.omitNorms, fieldInfo.storePayloads, fieldInfo.omitTf);
-    } else {
-      fi.update(fieldInfo);
-    }
-    return fi;
-  }
-
   private FieldInfo addInternal(String name, boolean isIndexed,
                                 boolean storeTermVector, boolean storePositionWithTermVector,

                                 boolean storeOffsetWithTermVector, boolean omitNorms, boolean
storePayloads, boolean omitTf) {



Mime
View raw message