lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r881891 - in /lucene/java/branches/flex_1458/src/java/org/apache/lucene/index: ./ codecs/ codecs/intblock/ codecs/preflex/ codecs/pulsing/ codecs/sep/ codecs/standard/
Date Wed, 18 Nov 2009 19:28:49 GMT
Author: markrmiller
Date: Wed Nov 18 19:28:48 2009
New Revision: 881891

URL: http://svn.apache.org/viewvc?rev=881891&view=rev
Log:
LUCENE-1458: generify, remove unused imports, nocommit unread fields

Modified:
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/IntBlockCodec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexCodec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingCodec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingDocsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepCodec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPositionsReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/DeltaBytesWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardCodec.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardDocsReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardPositionsReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsIndexReader.java

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexFileDeleter.java
Wed Nov 18 19:28:48 2009
@@ -143,7 +143,7 @@
     // First pass: walk the files and initialize our ref
     // counts:
     long currentGen = segmentInfos.getGeneration();
-    final Collection codecsExtensions = codecs.getAllExtensions();
+    final Collection<String> codecsExtensions = codecs.getAllExtensions();
     final FilenameFilter mainFilter = IndexFileNameFilter.getFilter();
 
     indexFilenameFilter = new FilenameFilter() {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codec.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codec.java Wed
Nov 18 19:28:48 2009
@@ -50,10 +50,10 @@
   public abstract FieldsProducer fieldsProducer(Directory dir, FieldInfos fieldInfos, SegmentInfo
si, int readBufferSize, int indexDivisor) throws IOException;
 
   /** Gathers files associated with this segment */
-  public abstract void files(Directory dir, SegmentInfo segmentInfo, Collection files) throws
IOException;
+  public abstract void files(Directory dir, SegmentInfo segmentInfo, Collection<String>
files) throws IOException;
 
   /** Records all file extensions this codec uses */
-  public abstract void getExtensions(Collection extensions);
+  public abstract void getExtensions(Collection<String> extensions);
 
   /** @return Actual version of the file */
   public static int checkHeader(IndexInput in, String codec, int version) throws IOException
{

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/Codecs.java Wed
Nov 18 19:28:48 2009
@@ -36,9 +36,9 @@
 
 public abstract class Codecs {
 
-  private final HashMap codecs = new HashMap();
+  private final HashMap<String, Codec> codecs = new HashMap<String, Codec>();
 
-  private final Collection knownExtensions = new HashSet();
+  private final Collection<String> knownExtensions = new HashSet<String>();
 
   public void register(Codec codec) {
     if (codec.name == null) {
@@ -53,7 +53,7 @@
     }
   }
 
-  public Collection getAllExtensions() {
+  public Collection<String> getAllExtensions() {
     return knownExtensions;
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
Wed Nov 18 19:28:48 2009
@@ -32,8 +32,8 @@
   private int blockSize;
   private int[] pending;
   private int upto;
-  private long lastSavedFilePointer;
-  private int lastSavedUpto;
+  private long lastSavedFilePointer; //nocommit: not read
+  private int lastSavedUpto; //nocommit: not read
 
   protected void init(IndexOutput out, int fixedBlockSize) throws IOException {
     blockSize = fixedBlockSize;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/IntBlockCodec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/IntBlockCodec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/IntBlockCodec.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/intblock/IntBlockCodec.java
Wed Nov 18 19:28:48 2009
@@ -24,8 +24,6 @@
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.index.codecs.Codec;
-import org.apache.lucene.index.codecs.DocsConsumer;
-import org.apache.lucene.index.codecs.standard.StandardDocsProducer;
 import org.apache.lucene.index.codecs.FieldsConsumer;
 import org.apache.lucene.index.codecs.FieldsProducer;
 import org.apache.lucene.index.codecs.sep.SepCodec;
@@ -33,11 +31,12 @@
 import org.apache.lucene.index.codecs.sep.SepDocsWriter;
 import org.apache.lucene.index.codecs.standard.SimpleStandardTermsIndexReader;
 import org.apache.lucene.index.codecs.standard.SimpleStandardTermsIndexWriter;
+import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
+import org.apache.lucene.index.codecs.standard.StandardDocsProducer;
 import org.apache.lucene.index.codecs.standard.StandardTermsDictReader;
 import org.apache.lucene.index.codecs.standard.StandardTermsDictWriter;
 import org.apache.lucene.index.codecs.standard.StandardTermsIndexReader;
 import org.apache.lucene.index.codecs.standard.StandardTermsIndexWriter;
-import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
 import org.apache.lucene.store.Directory;
 
 public class IntBlockCodec extends Codec {
@@ -123,14 +122,14 @@
   }
 
   @Override
-  public void files(Directory dir, SegmentInfo segmentInfo, Collection files) {
+  public void files(Directory dir, SegmentInfo segmentInfo, Collection<String> files)
{
     SepDocsReader.files(segmentInfo, files);
     StandardTermsDictReader.files(dir, segmentInfo, files);
     SimpleStandardTermsIndexReader.files(dir, segmentInfo, files);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     SepCodec.getSepExtensions(extensions);
   }
 }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexCodec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexCodec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexCodec.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexCodec.java
Wed Nov 18 19:28:48 2009
@@ -60,12 +60,12 @@
   }
 
   @Override
-  public void files(Directory dir, SegmentInfo info, Collection files) throws IOException
{
+  public void files(Directory dir, SegmentInfo info, Collection<String> files) throws
IOException {
     PreFlexFields.files(dir, info, files);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     extensions.add(FREQ_EXTENSION);
     extensions.add(PROX_EXTENSION);
     extensions.add(TERMS_EXTENSION);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java
Wed Nov 18 19:28:48 2009
@@ -49,7 +49,7 @@
   // nocomit -- needed public by SR
   public final IndexInput proxStream;
   final private FieldInfos fieldInfos;
-  final TreeMap fields = new TreeMap(); /*String -> FieldInfo */
+  final TreeMap<String,FieldInfo> fields = new TreeMap<String,FieldInfo>();
 
   PreFlexFields(Directory dir, FieldInfos fieldInfos, SegmentInfo info, int readBufferSize,
int indexDivisor)
     throws IOException {
@@ -78,7 +78,7 @@
     }
   }
 
-  static void files(Directory dir, SegmentInfo info, Collection files) throws IOException
{
+  static void files(Directory dir, SegmentInfo info, Collection<String> files) throws
IOException {
     files.add(IndexFileNames.segmentFileName(info.name, PreFlexCodec.TERMS_EXTENSION));
     files.add(IndexFileNames.segmentFileName(info.name, PreFlexCodec.TERMS_INDEX_EXTENSION));
     files.add(IndexFileNames.segmentFileName(info.name, PreFlexCodec.FREQ_EXTENSION));
@@ -122,7 +122,7 @@
   }
 
   private class Fields extends FieldsEnum {
-    Iterator it;
+    Iterator<FieldInfo> it;
     FieldInfo current;
     private PreTermsEnum lastTermsEnum;
 
@@ -133,7 +133,7 @@
     @Override
     public String next() {
       if (it.hasNext()) {
-        current = (FieldInfo) it.next();
+        current = it.next();
         return current.name;
       } else {
         return null;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/SegmentTermPositions.java
Wed Nov 18 19:28:48 2009
@@ -17,13 +17,13 @@
  * limitations under the License.
  */
 
+import java.io.IOException;
+
+import org.apache.lucene.index.FieldInfos;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.index.TermPositions;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.util.Bits;
-import org.apache.lucene.index.TermPositions;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.index.FieldInfos;
-
-import java.io.IOException;
 
 public final class SegmentTermPositions
 extends SegmentTermDocs implements TermPositions {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/preflex/TermInfosReader.java
Wed Nov 18 19:28:48 2009
@@ -38,7 +38,7 @@
   private final String segment;
   private final FieldInfos fieldInfos;
 
-  private final CloseableThreadLocal threadResources = new CloseableThreadLocal();
+  private final CloseableThreadLocal<ThreadResources> threadResources = new CloseableThreadLocal<ThreadResources>();
   private final SegmentTermEnum origEnum;
   private final long size;
 
@@ -57,7 +57,7 @@
     SegmentTermEnum termEnum;
     
     // Used for caching the least recently looked-up Terms
-    Cache termInfoCache;
+    Cache<Term,TermInfo> termInfoCache;
   }
   
   TermInfosReader(Directory dir, String seg, FieldInfos fis, int readBufferSize, int indexDivisor)
@@ -148,7 +148,7 @@
       resources = new ThreadResources();
       resources.termEnum = terms();
       // Cache does not have to be thread-safe, it is only used by one thread at the same
time
-      resources.termInfoCache = new SimpleLRUCache(DEFAULT_CACHE_SIZE);
+      resources.termInfoCache = new SimpleLRUCache<Term,TermInfo>(DEFAULT_CACHE_SIZE);
       threadResources.set(resources);
     }
     return resources;
@@ -192,7 +192,7 @@
 
     TermInfo ti;
     ThreadResources resources = getThreadResources();
-    Cache cache = null;
+    Cache<Term,TermInfo> cache = null;
     
     if (useCache) {
       cache = resources.termInfoCache;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingCodec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingCodec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingCodec.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingCodec.java
Wed Nov 18 19:28:48 2009
@@ -24,7 +24,6 @@
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.index.codecs.Codec;
-import org.apache.lucene.index.codecs.DocsConsumer;
 import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
 import org.apache.lucene.index.codecs.standard.StandardDocsProducer;
 import org.apache.lucene.index.codecs.FieldsConsumer;
@@ -34,7 +33,6 @@
 import org.apache.lucene.index.codecs.standard.StandardCodec;
 import org.apache.lucene.index.codecs.standard.StandardDocsReader;
 import org.apache.lucene.index.codecs.standard.StandardDocsWriter;
-import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
 import org.apache.lucene.index.codecs.standard.StandardTermsDictReader;
 import org.apache.lucene.index.codecs.standard.StandardTermsDictWriter;
 import org.apache.lucene.index.codecs.standard.StandardTermsIndexReader;
@@ -139,14 +137,14 @@
   }
 
   @Override
-  public void files(Directory dir, SegmentInfo segmentInfo, Collection files) throws IOException
{
+  public void files(Directory dir, SegmentInfo segmentInfo, Collection<String> files)
throws IOException {
     StandardDocsReader.files(dir, segmentInfo, files);
     StandardTermsDictReader.files(dir, segmentInfo, files);
     SimpleStandardTermsIndexReader.files(dir, segmentInfo, files);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     StandardCodec.getStandardExtensions(extensions);
   }
 }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingDocsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingDocsWriter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingDocsWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingDocsWriter.java
Wed Nov 18 19:28:48 2009
@@ -19,16 +19,14 @@
 
 import java.io.IOException;
 
-import org.apache.lucene.store.IndexOutput;
-import org.apache.lucene.util.ArrayUtil;
-
-import org.apache.lucene.index.codecs.DocsConsumer;
-import org.apache.lucene.index.codecs.PositionsConsumer;
-import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
-import org.apache.lucene.index.codecs.standard.StandardPositionsConsumer;
 import org.apache.lucene.index.FieldInfo;
 import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.index.codecs.Codec;
+import org.apache.lucene.index.codecs.PositionsConsumer;
+import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
+import org.apache.lucene.index.codecs.standard.StandardPositionsConsumer;
+import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.util.ArrayUtil;
 
 // TODO: we now pulse entirely according to docFreq of the
 // term; it might be better to eg pulse by "net bytes used"

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepCodec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepCodec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepCodec.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepCodec.java
Wed Nov 18 19:28:48 2009
@@ -119,18 +119,18 @@
   }
 
   @Override
-  public void files(Directory dir, SegmentInfo segmentInfo, Collection files) {
+  public void files(Directory dir, SegmentInfo segmentInfo, Collection<String> files)
{
     SepDocsReader.files(segmentInfo, files);
     StandardTermsDictReader.files(dir, segmentInfo, files);
     SimpleStandardTermsIndexReader.files(dir, segmentInfo, files);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     getSepExtensions(extensions);
   }
 
-  public static void getSepExtensions(Collection extensions) {
+  public static void getSepExtensions(Collection<String> extensions) {
     extensions.add(DOC_EXTENSION);
     extensions.add(FREQ_EXTENSION);
     extensions.add(SKIP_EXTENSION);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsReader.java
Wed Nov 18 19:28:48 2009
@@ -82,7 +82,7 @@
     }
   }
 
-  public static void files(SegmentInfo segmentInfo, Collection files) {
+  public static void files(SegmentInfo segmentInfo, Collection<String> files) {
     files.add(IndexFileNames.segmentFileName(segmentInfo.name, SepCodec.FREQ_EXTENSION));
     files.add(IndexFileNames.segmentFileName(segmentInfo.name, SepCodec.DOC_EXTENSION));
     files.add(IndexFileNames.segmentFileName(segmentInfo.name, SepCodec.SKIP_EXTENSION));

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsWriter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepDocsWriter.java
Wed Nov 18 19:28:48 2009
@@ -19,16 +19,14 @@
 
 import java.io.IOException;
 
-import org.apache.lucene.store.IndexOutput;
-import org.apache.lucene.index.codecs.DocsConsumer;
-import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
-import org.apache.lucene.index.codecs.PositionsConsumer;
-import org.apache.lucene.index.codecs.standard.StandardPositionsConsumer;
+import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.FieldInfo;
-import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.index.IndexFileNames;
-import org.apache.lucene.index.CorruptIndexException;
+import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.index.codecs.Codec;
+import org.apache.lucene.index.codecs.PositionsConsumer;
+import org.apache.lucene.index.codecs.standard.StandardDocsConsumer;
+import org.apache.lucene.store.IndexOutput;
 
 /** Writes frq to .frq, docs to .doc, pos to .pos, payloads
  *  to .pyl, skip data to .skp */

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPositionsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPositionsReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPositionsReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPositionsReader.java
Wed Nov 18 19:28:48 2009
@@ -59,7 +59,7 @@
     Codec.checkHeader(termsIn, SepPositionsWriter.CODEC, SepPositionsWriter.VERSION_START);
   }
 
-  static void files(SegmentInfo segmentInfo, Collection files) {
+  static void files(SegmentInfo segmentInfo, Collection<String> files) {
     if (segmentInfo.getHasProx()) {
       files.add(IndexFileNames.segmentFileName(segmentInfo.name, SepCodec.POS_EXTENSION));
       files.add(IndexFileNames.segmentFileName(segmentInfo.name, SepCodec.PAYLOAD_EXTENSION));

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
Wed Nov 18 19:28:48 2009
@@ -43,12 +43,12 @@
   // nocommit -- make private again
   final IntIndexInput.Index lastPosIndex;
   
-  private long lastFreqPointer;
-  private long lastDocPointer;
-  private long lastPosPointer;
+  private long lastFreqPointer; //nocommit: not read
+  private long lastDocPointer; //nocommit: not read
+  private long lastPosPointer; //nocommit: not read
   private long lastPayloadPointer;
   private int lastPayloadLength;
-  private int lastChildLevel;
+  private int lastChildLevel; //nocommit: not read
                            
   SepSkipListReader(IndexInput skipStream,
                     IntIndexInput freqIn,

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/DeltaBytesWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/DeltaBytesWriter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/DeltaBytesWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/DeltaBytesWriter.java
Wed Nov 18 19:28:48 2009
@@ -25,7 +25,7 @@
 
 final class DeltaBytesWriter {
 
-  private final UnicodeUtil.UTF8Result utf8 = new UnicodeUtil.UTF8Result();
+  private final UnicodeUtil.UTF8Result utf8 = new UnicodeUtil.UTF8Result(); //nocommit: not
read
 
   private byte[] lastBytes = new byte[10];
   private int lastLength;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexReader.java
Wed Nov 18 19:28:48 2009
@@ -403,8 +403,8 @@
         }
       }
 
-      final private TermRef termBuffer = new TermRef();
-      final private TermsIndexResult termsIndexResult = new TermsIndexResult();
+      final private TermRef termBuffer = new TermRef(); //nocommit: not read
+      final private TermsIndexResult termsIndexResult = new TermsIndexResult(); //nocommit:
not read
 
       public final void getIndexOffset(TermRef term, TermsIndexResult result) throws IOException
{
 
@@ -491,16 +491,16 @@
     return fields.get(fieldInfo);
   }
 
-  public static void files(Directory dir, SegmentInfo info, Collection files) {
+  public static void files(Directory dir, SegmentInfo info, Collection<String> files)
{
     files.add(IndexFileNames.segmentFileName(info.name, StandardCodec.TERMS_INDEX_EXTENSION));
   }
 
-  public static void getIndexExtensions(Collection extensions) {
+  public static void getIndexExtensions(Collection<String> extensions) {
     extensions.add(StandardCodec.TERMS_INDEX_EXTENSION);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     getIndexExtensions(extensions);
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexWriter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/SimpleStandardTermsIndexWriter.java
Wed Nov 18 19:28:48 2009
@@ -38,7 +38,7 @@
   final private int termIndexInterval;
 
   private final List<SimpleFieldWriter> fields = new ArrayList<SimpleFieldWriter>();
-  private final FieldInfos fieldInfos;
+  private final FieldInfos fieldInfos; // unread
   private IndexOutput termsOut;
 
   // nocommit

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardCodec.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardCodec.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardCodec.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardCodec.java
Wed Nov 18 19:28:48 2009
@@ -118,18 +118,18 @@
   static final String TERMS_INDEX_EXTENSION = "tii";
 
   @Override
-  public void files(Directory dir, SegmentInfo segmentInfo, Collection files) throws IOException
{
+  public void files(Directory dir, SegmentInfo segmentInfo, Collection<String> files)
throws IOException {
     StandardDocsReader.files(dir, segmentInfo, files);
     StandardTermsDictReader.files(dir, segmentInfo, files);
     SimpleStandardTermsIndexReader.files(dir, segmentInfo, files);
   }
 
   @Override
-  public void getExtensions(Collection extensions) {
+  public void getExtensions(Collection<String> extensions) {
     getStandardExtensions(extensions);
   }
 
-  public static void getStandardExtensions(Collection extensions) {
+  public static void getStandardExtensions(Collection<String> extensions) {
     extensions.add(FREQ_EXTENSION);
     extensions.add(PROX_EXTENSION);
     StandardTermsDictReader.getExtensions(extensions);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardDocsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardDocsReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardDocsReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardDocsReader.java
Wed Nov 18 19:28:48 2009
@@ -72,7 +72,7 @@
     }
   }
 
-  public static void files(Directory dir, SegmentInfo segmentInfo, Collection files) throws
IOException {
+  public static void files(Directory dir, SegmentInfo segmentInfo, Collection<String>
files) throws IOException {
     files.add(IndexFileNames.segmentFileName(segmentInfo.name, StandardCodec.FREQ_EXTENSION));
     StandardPositionsReader.files(dir, segmentInfo, files);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardPositionsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardPositionsReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardPositionsReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardPositionsReader.java
Wed Nov 18 19:28:48 2009
@@ -51,7 +51,7 @@
     Codec.checkHeader(termsIn, StandardPositionsWriter.CODEC, StandardPositionsWriter.VERSION_START);
   }
 
-  public static void files(Directory dir, SegmentInfo segmentInfo, Collection files) throws
IOException {
+  public static void files(Directory dir, SegmentInfo segmentInfo, Collection<String>
files) throws IOException {
     if (segmentInfo.getHasProx()) {
       String file = IndexFileNames.segmentFileName(segmentInfo.name, StandardCodec.PROX_EXTENSION);
       if (dir.fileExists(file))

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
Wed Nov 18 19:28:48 2009
@@ -152,11 +152,11 @@
     }
   }
 
-  public static void files(Directory dir, SegmentInfo segmentInfo, Collection files) {
+  public static void files(Directory dir, SegmentInfo segmentInfo, Collection<String>
files) {
     files.add(IndexFileNames.segmentFileName(segmentInfo.name, StandardCodec.TERMS_EXTENSION));
   }
 
-  public static void getExtensions(Collection extensions) {
+  public static void getExtensions(Collection<String> extensions) {
     extensions.add(StandardCodec.TERMS_EXTENSION);
   }
 
@@ -207,7 +207,7 @@
   }
   
   private class FieldReader extends Terms {
-    private final CloseableThreadLocal threadResources = new CloseableThreadLocal();
+    private final CloseableThreadLocal<ThreadResources> threadResources = new CloseableThreadLocal<ThreadResources>();
     final long numTerms;
     final FieldInfo fieldInfo;
     final long termsStartPointer;
@@ -534,6 +534,10 @@
   // would be better
   private static class ReuseLRUCache<K,V> extends LinkedHashMap<K, V> {
 
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
     private final static float LOADFACTOR = 0.75f;
     private int cacheSize;
     V eldest;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
Wed Nov 18 19:28:48 2009
@@ -79,7 +79,7 @@
     fieldInfos = state.fieldInfos;
 
     // Count indexed fields up front
-    final int numFields = fieldInfos.size();
+    final int numFields = fieldInfos.size(); //nocommit: not read
     Codec.writeHeader(out, CODEC_NAME, VERSION_CURRENT); 
 
     out.writeLong(0);                             // leave space for end index pointer

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsIndexReader.java?rev=881891&r1=881890&r2=881891&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsIndexReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsIndexReader.java
Wed Nov 18 19:28:48 2009
@@ -67,5 +67,5 @@
 
   public abstract void close() throws IOException;
 
-  public abstract void getExtensions(Collection extensions);
+  public abstract void getExtensions(Collection<String> extensions);
 }
\ No newline at end of file



Mime
View raw message