lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject [Lucene.Net] svn commit: r1203112 - in /incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk: src/core/ src/core/Index/ src/core/Search/ src/core/Store/ src/core/Support/ test/core/ test/core/Analysis/ test/core/Index/
Date Thu, 17 Nov 2011 08:53:58 GMT
Author: ccurrens
Date: Thu Nov 17 08:53:57 2011
New Revision: 1203112

URL: http://svn.apache.org/viewvc?rev=1203112&view=rev
Log:
ported more files and fixed tests.  Some tests will intermittently fail, possibly because there are still only partially ported classes.

Modified:
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/AssemblyInfo.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/AbstractAllTermDocs.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/DirectoryReader.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/FilterIndexReader.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNameFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNames.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexWriter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ParallelReader.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ReusableStringReader.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMergeQueue.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMerger.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermDocs.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermPositions.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SerialMergeScheduler.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/Term.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermDocs.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermVectorsReader.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FilteredTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/NumericRangeQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/SingleTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/WildcardTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/FSDirectory.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/SimpleFSDirectory.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Support/HashMap.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Analysis/TestAnalyzers.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/AssemblyInfo.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestConcurrentMergeScheduler.cs

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/AssemblyInfo.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/AssemblyInfo.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/AssemblyInfo.cs Thu Nov 17 08:53:57 2011
@@ -56,7 +56,7 @@ using System.Runtime.CompilerServices;
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.9.4.001")]
+[assembly: AssemblyVersion("3.0.3")]
 
 
 //

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt Thu Nov 17 08:53:57 2011
@@ -83,7 +83,7 @@ index\
 	index\AllTermDocs.java - IDENTICAL
 	index\BufferedDeletes.java - PORTED
 	index\ByteBlockPool.java - PORTED
-	index\ByteSliceReader.java - Text files are different
+	index\ByteSliceReader.java - PORTED
 	index\ByteSliceWriter.java - IDENTICAL
 	index\CharBlockPool.java - IDENTICAL
 	index\CheckIndex.java - PORTED
@@ -135,8 +135,8 @@ index\
 	index\IndexCommitPoint.java - Removed in 3.x
 	index\IndexDeletionPolicy.java - PORTED
 	index\IndexFileDeleter.java - PORTED
-	index\IndexFileNameFilter.java - Text files are different
-	index\IndexFileNames.java - Text files are different
+	index\IndexFileNameFilter.java - DONE
+	index\IndexFileNames.java - DONE
 	index\IndexModifier.java - Removed in 3.x
 	index\IndexReader.java - PORTED
 	index\IndexWriter.java - PORTED
@@ -167,30 +167,30 @@ index\
 	index\PositionBasedTermVectorMapper.java - Text files are different
 	index\RawPostingList.java - IDENTICAL
 	index\ReadOnlyDirectoryReader.java - PORTED
-	index\ReadOnlySegmentReader.java - Text files are different
-	index\ReusableStringReader.java - Text files are different
+	index\ReadOnlySegmentReader.java - PORTED
+	index\ReusableStringReader.java - PORTED
 	index\SegmentInfo.java - PORTED
-	index\SegmentInfos.java - PORTED * doesn't inherit from a generic equiv as in java
+	index\SegmentInfos.java - PORTED * doesn't inherit from a generic equiv as in java (java's is threadsafe)
 	index\SegmentMergeInfo.java - IDENTICAL
-	index\SegmentMergeQueue.java - Text files are different
-	index\SegmentMerger.java - Text files are different
+	index\SegmentMergeQueue.java - PORTED
+	index\SegmentMerger.java - PORTED
 	index\SegmentReader.java - PORTED
 	index\SegmentTermDocs.java - IDENTICAL
-	index\SegmentTermEnum.java - Text files are different
-	index\SegmentTermPositions.java - Text files are different
+	index\SegmentTermEnum.java - PORTED
+	index\SegmentTermPositions.java - PORTED
 	index\SegmentTermPositionVector.java - IDENTICAL
-	index\SegmentTermVector.java - Text files are different
+	index\SegmentTermVector.java - PORTED
 	index\SegmentWriteState.java - PORTED
-	index\SerialMergeScheduler.java - Text files are different
+	index\SerialMergeScheduler.java - PORTED
 	index\SnapshotDeletionPolicy.java - PORTED
-	index\SortedTermVectorMapper.java - PORTEDS
+	index\SortedTermVectorMapper.java - PORTED
 	index\StaleReaderException.java - IDENTICAL
-	index\StoredFieldsWriter.java - Text files are different
+	index\StoredFieldsWriter.java - PORTED
 	index\StoredFieldsWriterPerThread.java - IDENTICAL
-	index\Term.java - Text files are different
-	index\TermBuffer.java - Text files are different
-	index\TermDocs.java - Text files are different
-	index\TermEnum.java - Text files are different
+	index\Term.java - PORTED
+	index\TermBuffer.java - PORTED
+	index\TermDocs.java - PORTED
+	index\TermEnum.java - PORTED
 	index\TermFreqVector.java - IDENTICAL
 	index\TermInfo.java - IDENTICAL
 	index\TermInfosReader.java - PORTED
@@ -206,8 +206,8 @@ index\
 	index\TermVectorEntry.java - Text files are different
 	index\TermVectorEntryFreqSortedComparator.java - Text files are different
 	index\TermVectorMapper.java - IDENTICAL
-	index\TermVectorOffsetInfo.java - Text files are different
-	index\TermVectorsReader.java - Text files are different
+	index\TermVectorOffsetInfo.java - PORTED
+	index\TermVectorsReader.java - PORTED
 	index\TermVectorsTermsWriter.java - Text files are different
 	index\TermVectorsTermsWriterPerField.java - Text files are different
 	index\TermVectorsTermsWriterPerThread.java - Text files are different
@@ -391,7 +391,7 @@ store
 	ChecksumIndexOutput.java - PORTED
 	Directory.java - PORTED
 	FileSwitchDirectory.java - PORTED
-	FSDirectory.java - Text files are different
+	FSDirectory.java - PORTED
 	FSLockFactory.java - IDENTICAL
 	IndexInput.java - PORTED * See IDisposable
 	IndexOutput.java - PORTED * See IDisposable

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/AbstractAllTermDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/AbstractAllTermDocs.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/AbstractAllTermDocs.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/AbstractAllTermDocs.cs Thu Nov 17 08:53:57 2011
@@ -105,6 +105,12 @@ namespace Lucene.Net.Index
 
         public void Close()
         {
+            Dispose();
+        }
+
+        public void Dispose()
+        {
+            
         }
 
         public abstract bool IsDeleted(int doc);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/DirectoryReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/DirectoryReader.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/DirectoryReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/DirectoryReader.cs Thu Nov 17 08:53:57 2011
@@ -1303,6 +1303,11 @@ namespace Lucene.Net.Index
             
             public override void  Close()
             {
+                Dispose();
+            }
+
+            public override void Dispose()
+            {
                 queue.Close();
             }
         }
@@ -1493,6 +1498,11 @@ namespace Lucene.Net.Index
             
             public virtual void  Close()
             {
+                Dispose();
+            }
+
+            public virtual void Dispose()
+            {
                 for (int i = 0; i < readerTermDocs.Length; i++)
                 {
                     if (readerTermDocs[i] != null)

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/FilterIndexReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/FilterIndexReader.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/FilterIndexReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/FilterIndexReader.cs Thu Nov 17 08:53:57 2011
@@ -76,8 +76,12 @@ namespace Lucene.Net.Index
 			}
 			public virtual void  Close()
 			{
-				in_Renamed.Close();
+				Dispose();
 			}
+            public virtual void Dispose()
+            {
+                in_Renamed.Close();
+            }
 		}
 		
 		/// <summary>Base class for filtering <see cref="TermPositions" /> implementations. </summary>
@@ -135,8 +139,12 @@ namespace Lucene.Net.Index
 			}
 			public override void  Close()
 			{
-				in_Renamed.Close();
+				Dispose();
 			}
+            public override void Dispose()
+            {
+                in_Renamed.Close();
+            }
 		}
 		
 		protected internal IndexReader in_Renamed;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNameFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNameFilter.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNameFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNameFilter.cs Thu Nov 17 08:53:57 2011
@@ -16,34 +16,31 @@
  */
 
 using System;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Index
 {
 	
-	/// <summary> Filename filter that accept filenames and extensions only created by Lucene.
-	/// 
-	/// </summary>
-	/// <version>  $rcs = ' $Id: Exp $ ' ;
-	/// </version>
+	/// <summary>Filename filter that accept filenames and extensions only created by Lucene. </summary>
 	public class IndexFileNameFilter
 	{
 		
 		private static IndexFileNameFilter singleton = new IndexFileNameFilter();
-        private System.Collections.Hashtable extensions;
-        private System.Collections.Hashtable extensionsInCFS;
+        private HashSet<String> extensions;
+        private HashSet<String> extensionsInCFS;
 		
 		// Prevent instantiation.
 		private IndexFileNameFilter()
 		{
-            extensions = new System.Collections.Hashtable();
+            extensions = new HashSet<String>();
 			for (int i = 0; i < IndexFileNames.INDEX_EXTENSIONS.Length; i++)
 			{
-				extensions.Add(IndexFileNames.INDEX_EXTENSIONS[i], IndexFileNames.INDEX_EXTENSIONS[i]);
+				extensions.Add(IndexFileNames.INDEX_EXTENSIONS[i]);
 			}
-            extensionsInCFS = new System.Collections.Hashtable();
+            extensionsInCFS = new HashSet<String>();
 			for (int i = 0; i < IndexFileNames.INDEX_EXTENSIONS_IN_COMPOUND_FILE.Length; i++)
 			{
-				extensionsInCFS.Add(IndexFileNames.INDEX_EXTENSIONS_IN_COMPOUND_FILE[i], IndexFileNames.INDEX_EXTENSIONS_IN_COMPOUND_FILE[i]);
+				extensionsInCFS.Add(IndexFileNames.INDEX_EXTENSIONS_IN_COMPOUND_FILE[i]);
 			}
 		}
 		

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNames.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNames.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNames.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexFileNames.cs Thu Nov 17 08:53:57 2011
@@ -21,11 +21,7 @@ using Lucene.Net.Support;
 namespace Lucene.Net.Index
 {
 	
-	/// <summary> Useful constants representing filenames and extensions used by lucene
-	/// 
-	/// </summary>
-	/// <version>  $rcs = ' $Id: Exp $ ' ;
-	/// </version>
+	/// <summary>Useful constants representing filenames and extensions used by lucene</summary>
 	public sealed class IndexFileNames
 	{
 		

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexWriter.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/IndexWriter.cs Thu Nov 17 08:53:57 2011
@@ -2088,6 +2088,7 @@ namespace Lucene.Net.Index
 							if (infoStream != null)
 								Message("hit exception building compound file doc store for segment " + docStoreSegment);
 							deleter.DeleteFile(compoundFileName);
+                            docWriter.Abort();
 						}
 					}
 					

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/MultipleTermPositions.cs Thu Nov 17 08:53:57 2011
@@ -188,9 +188,14 @@ namespace Lucene.Net.Index
 		
 		public void  Close()
 		{
-			while (_termPositionsQueue.Size() > 0)
-				_termPositionsQueue.Pop().Close();
+		    Dispose();
 		}
+
+        public void Dispose()
+        {
+            while (_termPositionsQueue.Size() > 0)
+                _termPositionsQueue.Pop().Close();
+        }
 		
 		/// <summary> Not implemented.</summary>
 		/// <throws>  UnsupportedOperationException </throws>

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ParallelReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ParallelReader.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ParallelReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ParallelReader.cs Thu Nov 17 08:53:57 2011
@@ -635,9 +635,14 @@ namespace Lucene.Net.Index
 			
 			public override void  Close()
 			{
-				if (termEnum != null)
-					termEnum.Close();
+			    Dispose();
 			}
+
+            public override void Dispose()
+            {
+                if (termEnum != null)
+                    termEnum.Close();
+            }
 		}
 		
 		// wrap a TermDocs in order to support seek(Term)
@@ -719,9 +724,14 @@ namespace Lucene.Net.Index
 			
 			public virtual void  Close()
 			{
-				if (termDocs != null)
-					termDocs.Close();
+			    Dispose();
 			}
+
+            public virtual void Dispose()
+            {
+                if (termDocs != null)
+                    termDocs.Close();
+            }
 		}
 		
 		private class ParallelTermPositions:ParallelTermDocs, TermPositions

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ReusableStringReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ReusableStringReader.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ReusableStringReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/ReusableStringReader.cs Thu Nov 17 08:53:57 2011
@@ -51,6 +51,7 @@ namespace Lucene.Net.Index
             }
             else if (0 == left)
             {
+                // don't keep a reference (s could have been very large)
                 s = null;
                 return 0;
             }

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMergeQueue.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMergeQueue.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMergeQueue.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMergeQueue.cs Thu Nov 17 08:53:57 2011
@@ -21,7 +21,7 @@ using Lucene.Net.Util;
 namespace Lucene.Net.Index
 {
 	
-	sealed class SegmentMergeQueue:PriorityQueue<SegmentMergeInfo>
+	sealed class SegmentMergeQueue : PriorityQueue<SegmentMergeInfo>
 	{
 		internal SegmentMergeQueue(int size)
 		{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMerger.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMerger.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMerger.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentMerger.cs Thu Nov 17 08:53:57 2011
@@ -16,7 +16,7 @@
  */
 
 using System;
-
+using System.Collections.Generic;
 using Document = Lucene.Net.Documents.Document;
 using FieldSelector = Lucene.Net.Documents.FieldSelector;
 using FieldSelectorResult = Lucene.Net.Documents.FieldSelectorResult;
@@ -128,7 +128,7 @@ namespace Lucene.Net.Index
 		private System.String segment;
 		private int termIndexInterval;
 		
-		private System.Collections.IList readers = new System.Collections.ArrayList();
+		private IList<IndexReader> readers = new List<IndexReader>();
 		private FieldInfos fieldInfos;
 		
 		private int mergedDocs;
@@ -197,7 +197,7 @@ namespace Lucene.Net.Index
 		/// </returns>
 		internal IndexReader SegmentReader(int i)
 		{
-			return (IndexReader) readers[i];
+			return readers[i];
 		}
 		
 		/// <summary> Merges the readers specified by the <see cref="Add" /> method into the directory passed to the constructor</summary>
@@ -248,15 +248,15 @@ namespace Lucene.Net.Index
 		/// <throws>  IOException </throws>
 		public /*internal*/ void  CloseReaders()
 		{
-			for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+			foreach(IndexReader reader in readers)
 			{
-				((IndexReader) iter.Current).Close();
+				reader.Close();
 			}
 		}
 
-        public /*internal*/ System.Collections.Generic.ICollection<string> GetMergedFiles()
+        public /*internal*/ ICollection<string> GetMergedFiles()
 		{
-            System.Collections.Generic.IDictionary<string,string> fileSet = new System.Collections.Generic.Dictionary<string,string>();
+            ISet<string> fileSet = new HashSet<string>();
 			
 			// Basic files
 			for (int i = 0; i < IndexFileNames.COMPOUND_EXTENSIONS.Length; i++)
@@ -267,7 +267,7 @@ namespace Lucene.Net.Index
 					continue;
 				
 				if (mergeDocStores || (!ext.Equals(IndexFileNames.FIELDS_EXTENSION) && !ext.Equals(IndexFileNames.FIELDS_INDEX_EXTENSION)))
-                    fileSet[segment + "." + ext] = segment + "." + ext;
+                    fileSet.Add(segment + "." + ext);
 			}
 			
 			// Fieldable norm files
@@ -276,7 +276,7 @@ namespace Lucene.Net.Index
 				FieldInfo fi = fieldInfos.FieldInfo(i);
 				if (fi.isIndexed && !fi.omitNorms)
 				{
-                    fileSet[segment + "." + IndexFileNames.NORMS_EXTENSION]=segment + "." + IndexFileNames.NORMS_EXTENSION;
+                    fileSet.Add(segment + "." + IndexFileNames.NORMS_EXTENSION);
 					break;
 				}
 			}
@@ -286,23 +286,22 @@ namespace Lucene.Net.Index
 			{
 				for (int i = 0; i < IndexFileNames.VECTOR_EXTENSIONS.Length; i++)
 				{
-                    fileSet[segment + "." + IndexFileNames.VECTOR_EXTENSIONS[i]] = segment + "." + IndexFileNames.VECTOR_EXTENSIONS[i];
+                    fileSet.Add(segment + "." + IndexFileNames.VECTOR_EXTENSIONS[i]);
 				}
 			}
 
-            return fileSet.Keys;
+            return fileSet;
         }
 
-        public /*internal*/ System.Collections.Generic.ICollection<string> CreateCompoundFile(System.String fileName)
+        public /*internal*/ ICollection<string> CreateCompoundFile(System.String fileName)
         {
-            System.Collections.Generic.ICollection<string> files = GetMergedFiles();
+            ICollection<string> files = GetMergedFiles();
             CompoundFileWriter cfsWriter = new CompoundFileWriter(directory, fileName, checkAbort);
 
 			// Now merge all added files
-			System.Collections.IEnumerator it = files.GetEnumerator();
-			while (it.MoveNext())
+			foreach(var file in files)
 			{
-				cfsWriter.AddFile((System.String) it.Current);
+				cfsWriter.AddFile(file);
 			}
 			
 			// Perform the merge
@@ -311,17 +310,16 @@ namespace Lucene.Net.Index
             return files;
 		}
 
-        private void AddIndexed(IndexReader reader, FieldInfos fInfos, System.Collections.Generic.ICollection<string> names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool storePayloads, bool omitTFAndPositions)
-		{
-			System.Collections.Generic.IEnumerator<string> i = names.GetEnumerator();
-			while (i.MoveNext())
-			{
-                System.String field = i.Current;
-				fInfos.Add(field, true, storeTermVectors, storePositionWithTermVector, storeOffsetWithTermVector, !reader.HasNorms(field), storePayloads, omitTFAndPositions);
-			}
-		}
-		
-		private SegmentReader[] matchingSegmentReaders;
+        private void AddIndexed(IndexReader reader, FieldInfos fInfos, ICollection<string> names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool storePayloads, bool omitTFAndPositions)
+        {
+            foreach (var field in names)
+            {
+                fInfos.Add(field, true, storeTermVectors, storePositionWithTermVector, storeOffsetWithTermVector,
+                           !reader.HasNorms(field), storePayloads, omitTFAndPositions);
+            }
+        }
+
+	    private SegmentReader[] matchingSegmentReaders;
 		private int[] rawDocLengths;
 		private int[] rawDocLengths2;
 		
@@ -339,7 +337,7 @@ namespace Lucene.Net.Index
 			// stored fields:
 			for (int i = 0; i < numReaders; i++)
 			{
-				IndexReader reader = (IndexReader) readers[i];
+				IndexReader reader = readers[i];
 				if (reader is SegmentReader)
 				{
 					SegmentReader segmentReader = (SegmentReader) reader;
@@ -372,9 +370,7 @@ namespace Lucene.Net.Index
 			
 			if (!mergeDocStores)
 			{
-				// When we are not merging by doc stores, that means
-				// all segments were written as part of a single
-				// autoCommit=false IndexWriter session, so their field
+				// When we are not merging by doc stores, their field
 				// name -> number mapping are the same.  So, we start
 				// with the fieldInfos of the last segment in this
 				// case, to keep that numbering.
@@ -386,9 +382,8 @@ namespace Lucene.Net.Index
 				fieldInfos = new FieldInfos(); // merge field names
 			}
 			
-			for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+			foreach(IndexReader reader in readers)
 			{
-				IndexReader reader = (IndexReader) iter.Current;
 				if (reader is SegmentReader)
 				{
 					SegmentReader segmentReader = (SegmentReader) reader;
@@ -420,20 +415,14 @@ namespace Lucene.Net.Index
 			
 			if (mergeDocStores)
 			{
-				
-				// for merging we don't want to compress/uncompress the data, so to tell the FieldsReader that we're
-				// in  merge mode, we use this FieldSelector
-				FieldSelector fieldSelectorMerge = new AnonymousClassFieldSelector(this);
-				
 				// merge field values
 				FieldsWriter fieldsWriter = new FieldsWriter(directory, segment, fieldInfos);
 				
 				try
 				{
 					int idx = 0;
-					for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+					foreach(IndexReader reader in readers)
 					{
-						IndexReader reader = (IndexReader) iter.Current;
 						SegmentReader matchingSegmentReader = matchingSegmentReaders[idx++];
 						FieldsReader matchingFieldsReader = null;
 						if (matchingSegmentReader != null)
@@ -446,11 +435,11 @@ namespace Lucene.Net.Index
 						}
 						if (reader.HasDeletions())
 						{
-							docCount += CopyFieldsWithDeletions(fieldSelectorMerge, fieldsWriter, reader, matchingFieldsReader);
+							docCount += CopyFieldsWithDeletions(fieldsWriter, reader, matchingFieldsReader);
 						}
 						else
 						{
-							docCount += CopyFieldsNoDeletions(fieldSelectorMerge, fieldsWriter, reader, matchingFieldsReader);
+							docCount += CopyFieldsNoDeletions(fieldsWriter, reader, matchingFieldsReader);
 						}
 					}
 				}
@@ -475,16 +464,16 @@ namespace Lucene.Net.Index
 			// just sum numDocs() of each segment to get total docCount
 			else
 			{
-				for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+				foreach(IndexReader reader in readers)
 				{
-					docCount += ((IndexReader) iter.Current).NumDocs();
+					docCount += reader.NumDocs();
 				}
 			}
 			
 			return docCount;
 		}
 		
-		private int CopyFieldsWithDeletions(FieldSelector fieldSelectorMerge, FieldsWriter fieldsWriter, IndexReader reader, FieldsReader matchingFieldsReader)
+		private int CopyFieldsWithDeletions(FieldsWriter fieldsWriter, IndexReader reader, FieldsReader matchingFieldsReader)
 		{
 			int docCount = 0;
 			int maxDoc = reader.MaxDoc();
@@ -533,7 +522,7 @@ namespace Lucene.Net.Index
 					}
 					// NOTE: it's very important to first assign to doc then pass it to
 					// termVectorsWriter.addAllDocVectors; see LUCENE-1282
-					Document doc = reader.Document(j, fieldSelectorMerge);
+					Document doc = reader.Document(j);
 					fieldsWriter.AddDocument(doc);
 					docCount++;
 					checkAbort.Work(300);
@@ -542,7 +531,7 @@ namespace Lucene.Net.Index
 			return docCount;
 		}
 		
-		private int CopyFieldsNoDeletions(FieldSelector fieldSelectorMerge, FieldsWriter fieldsWriter, IndexReader reader, FieldsReader matchingFieldsReader)
+		private int CopyFieldsNoDeletions(FieldsWriter fieldsWriter, IndexReader reader, FieldsReader matchingFieldsReader)
 		{
 			int maxDoc = reader.MaxDoc();
 			int docCount = 0;
@@ -564,7 +553,7 @@ namespace Lucene.Net.Index
 				{
 					// NOTE: it's very important to first assign to doc then pass it to
 					// termVectorsWriter.addAllDocVectors; see LUCENE-1282
-					Document doc = reader.Document(docCount, fieldSelectorMerge);
+					Document doc = reader.Document(docCount);
 					fieldsWriter.AddDocument(doc);
 					checkAbort.Work(300);
 				}
@@ -581,7 +570,7 @@ namespace Lucene.Net.Index
 			try
 			{
 				int idx = 0;
-				for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+				foreach(IndexReader reader in readers)
 				{
 					SegmentReader matchingSegmentReader = matchingSegmentReaders[idx++];
 					TermVectorsReader matchingVectorsReader = null;
@@ -595,7 +584,6 @@ namespace Lucene.Net.Index
 							matchingVectorsReader = vectorsReader;
 						}
 					}
-					IndexReader reader = (IndexReader) iter.Current;
 					if (reader.HasDeletions())
 					{
 						CopyVectorsWithDeletions(termVectorsWriter, matchingVectorsReader, reader);
@@ -738,7 +726,7 @@ namespace Lucene.Net.Index
 			int readerCount = readers.Count;
 			for (int i = 0; i < readerCount; i++)
 			{
-				IndexReader reader = (IndexReader) readers[i];
+				IndexReader reader = readers[i];
 				TermEnum termEnum = reader.Terms();
 				SegmentMergeInfo smi = new SegmentMergeInfo(base_Renamed, termEnum, reader);
 				int[] docMap = smi.GetDocMap();
@@ -772,14 +760,14 @@ namespace Lucene.Net.Index
 			while (queue.Size() > 0)
 			{
 				int matchSize = 0; // pop matching terms
-				match[matchSize++] = (SegmentMergeInfo) queue.Pop();
+				match[matchSize++] = queue.Pop();
 				Term term = match[0].term;
-				SegmentMergeInfo top = (SegmentMergeInfo) queue.Top();
+				SegmentMergeInfo top = queue.Top();
 				
 				while (top != null && term.CompareTo(top.term) == 0)
 				{
-					match[matchSize++] = (SegmentMergeInfo) queue.Pop();
-					top = (SegmentMergeInfo) queue.Top();
+					match[matchSize++] = queue.Pop();
+					top = queue.Top();
 				}
 				
 				if ((System.Object) currentField != (System.Object) term.field)
@@ -898,9 +886,8 @@ namespace Lucene.Net.Index
 							output = directory.CreateOutput(segment + "." + IndexFileNames.NORMS_EXTENSION);
 							output.WriteBytes(NORMS_HEADER, NORMS_HEADER.Length);
 						}
-						for (System.Collections.IEnumerator iter = readers.GetEnumerator(); iter.MoveNext(); )
+						foreach(IndexReader reader in readers)
 						{
-							IndexReader reader = (IndexReader) iter.Current;
 							int maxDoc = reader.MaxDoc();
 							if (normBuffer == null || normBuffer.Length < maxDoc)
 							{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermDocs.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermDocs.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermDocs.cs Thu Nov 17 08:53:57 2011
@@ -111,10 +111,15 @@ namespace Lucene.Net.Index
 		
 		public virtual void  Close()
 		{
-			freqStream.Close();
-			if (skipListReader != null)
-				skipListReader.Close();
+		    Dispose();
 		}
+
+        public virtual void Dispose()
+        {
+            freqStream.Close();
+            if (skipListReader != null)
+                skipListReader.Close();
+        }
 		
 		public int Doc()
 		{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermEnum.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermEnum.cs Thu Nov 17 08:53:57 2011
@@ -244,7 +244,12 @@ namespace Lucene.Net.Index
 		/// <summary>Closes the enumeration to further activity, freeing resources. </summary>
 		public override void  Close()
 		{
-			input.Close();
+            Dispose();
 		}
+
+        public override void Dispose()
+        {
+            input.Close();
+        }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermPositions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermPositions.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermPositions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SegmentTermPositions.cs Thu Nov 17 08:53:57 2011
@@ -58,10 +58,15 @@ namespace Lucene.Net.Index
 		
 		public override void  Close()
 		{
-			base.Close();
-			if (proxStream != null)
-				proxStream.Close();
+            Dispose();
 		}
+
+        public override void Dispose()
+        {
+            base.Dispose();
+            if (proxStream != null)
+                proxStream.Close();
+        }
 		
 		public int NextPosition()
 		{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SerialMergeScheduler.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SerialMergeScheduler.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SerialMergeScheduler.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/SerialMergeScheduler.cs Thu Nov 17 08:53:57 2011
@@ -34,7 +34,6 @@ namespace Lucene.Net.Index
 		{
 			lock (this)
 			{
-				
 				while (true)
 				{
 					MergePolicy.OneMerge merge = writer.GetNextMerge();

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/Term.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/Term.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/Term.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/Term.cs Thu Nov 17 08:53:57 2011
@@ -128,11 +128,6 @@ namespace Lucene.Net.Index
 			return result;
 		}
 		
-		public int CompareTo(System.Object other)
-		{
-			return CompareTo((Term) other);
-		}
-		
 		/// <summary>Compares two terms, returning a negative integer if this
 		/// term belongs before the argument, zero if this term is equal to the
 		/// argument, and a positive integer if this term belongs after the argument.

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermDocs.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermDocs.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermDocs.cs Thu Nov 17 08:53:57 2011
@@ -29,7 +29,7 @@ namespace Lucene.Net.Index
 	/// <seealso cref="IndexReader.TermDocs()">
 	/// </seealso>
 	
-	public interface TermDocs
+	public interface TermDocs : IDisposable
 	{
 		/// <summary>Sets this to the data for a term.
 		/// The enumeration is reset to the start of the data for this term.

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermEnum.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermEnum.cs Thu Nov 17 08:53:57 2011
@@ -24,8 +24,7 @@ namespace Lucene.Net.Index
 	/// <p/>Term enumerations are always ordered by Term.compareTo().  Each term in
 	/// the enumeration is greater than all that precede it.  
 	/// </summary>
-	
-	public abstract class TermEnum
+	public abstract class TermEnum : IDisposable
 	{
 		/// <summary>Increments the enumeration to the next element.  True if one exists.</summary>
 		public abstract bool Next();
@@ -38,35 +37,7 @@ namespace Lucene.Net.Index
 		
 		/// <summary>Closes the enumeration to further activity, freeing resources. </summary>
 		public abstract void  Close();
-		
-		/// <summary>Skips terms to the first beyond the current whose value is
-		/// greater or equal to <i>target</i>. <p/>Returns true iff there is such
-        /// an entry.  <p/>Behaves as if written: <code>
-		/// public boolean skipTo(Term target) {
-		///     do {
-		///         if (!next())
-		///             return false;
-		///     } while (target > term());
-		///         return true;
-		/// }
-        /// </code>
-		/// Some implementations *could* be considerably more efficient than a linear scan.
-		/// Check the implementation to be sure.
-		/// </summary>
-		/// <deprecated> This method is not performant and will be removed in Lucene 3.0.
-		/// Use <see cref="IndexReader.Terms(Term)" /> to create a new TermEnum positioned at a
-		/// given term.
-		/// </deprecated>
-        [Obsolete("This method is not performant and will be removed in Lucene 3.0.Use IndexReader.Terms(Term) to create a new TermEnum positioned at a given term.")]
-		public virtual bool SkipTo(Term target)
-		{
-			do 
-			{
-				if (!Next())
-					return false;
-			}
-			while (target.CompareTo(Term()) > 0);
-			return true;
-		}
+
+	    public abstract void Dispose();
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermVectorsReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermVectorsReader.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermVectorsReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Index/TermVectorsReader.cs Thu Nov 17 08:53:57 2011
@@ -23,9 +23,6 @@ using IndexInput = Lucene.Net.Store.Inde
 
 namespace Lucene.Net.Index
 {
-	
-	/// <version>  $Id: TermVectorsReader.java 687046 2008-08-19 13:01:11Z mikemccand $
-	/// </version>
 	public class TermVectorsReader : System.ICloneable
 	{
 		

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FilteredTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FilteredTermEnum.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FilteredTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FilteredTermEnum.cs Thu Nov 17 08:53:57 2011
@@ -110,10 +110,15 @@ namespace Lucene.Net.Search
 		/// <summary>Closes the enumeration to further activity, freeing resources.  </summary>
 		public override void  Close()
 		{
-			if (actualEnum != null)
-				actualEnum.Close();
-			currentTerm = null;
-			actualEnum = null;
+            Dispose();
 		}
+
+        public override void Dispose()
+        {
+            if (actualEnum != null)
+                actualEnum.Close();
+            currentTerm = null;
+            actualEnum = null;
+        }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/NumericRangeQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/NumericRangeQuery.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/NumericRangeQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/NumericRangeQuery.cs Thu Nov 17 08:53:57 2011
@@ -631,10 +631,15 @@ namespace Lucene.Net.Search
 			//@Override
 			public override void  Close()
 			{
-				rangeBounds.Clear();
-				currentUpperBound = null;
-				base.Close();
+			    Dispose();	
 			}
+
+		    public override void Dispose()
+		    {
+                rangeBounds.Clear();
+                currentUpperBound = null;
+                base.Dispose();
+		    }
 		}
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/SingleTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/SingleTermEnum.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/SingleTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/SingleTermEnum.cs Thu Nov 17 08:53:57 2011
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+using System;
 using Lucene.Net.Index;
 
 namespace Lucene.Net.Search
@@ -65,5 +66,10 @@ namespace Lucene.Net.Search
                 return false;
             }
         }
+
+        public override void Dispose()
+        {
+            
+        }
     }
 }

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/WildcardTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/WildcardTermEnum.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/WildcardTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/WildcardTermEnum.cs Thu Nov 17 08:53:57 2011
@@ -32,7 +32,7 @@ namespace Lucene.Net.Search
 	/// </summary>
 	/// <version>  $Id: WildcardTermEnum.java 783371 2009-06-10 14:39:56Z mikemccand $
 	/// </version>
-	public class WildcardTermEnum:FilteredTermEnum
+	public class WildcardTermEnum : FilteredTermEnum
 	{
 		internal Term searchTerm;
 		internal System.String field;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/FSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/FSDirectory.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/FSDirectory.cs Thu Nov 17 08:53:57 2011
@@ -398,8 +398,9 @@ namespace Lucene.Net.Store
 						// In 3.0 we will change this to throw
 						// InterruptedException instead
                         // TODO: Change this to throwing a new ThreadInterruptedException when class is build
-						ThreadClass.Current().Interrupt();
-                        throw new System.SystemException(ie.ToString(), ie);
+                        // ThreadClass.Current().Interrupt();
+                        // throw new System.SystemException(ie.ToString(), ie);
+					    throw;
 					}
 				}
 			}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/SimpleFSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/SimpleFSDirectory.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/SimpleFSDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Store/SimpleFSDirectory.cs Thu Nov 17 08:53:57 2011
@@ -69,7 +69,7 @@ namespace Lucene.Net.Store
 		protected internal class SimpleFSIndexInput:BufferedIndexInput, System.ICloneable
 		{
 			// TODO: This is a bad way to handle memory and disposing
-			protected internal class Descriptor:System.IO.BinaryReader
+			protected internal class Descriptor : System.IO.BinaryReader
 			{
 				// remember if the file is open, so that we don't try to close it
 				// more than once
@@ -89,7 +89,7 @@ namespace Lucene.Net.Store
 					if (isOpen)
 					{
 						isOpen = false;
-						base.Close();
+                        base.Close();
 					}
 				}
 			

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Support/HashMap.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Support/HashMap.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Support/HashMap.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Support/HashMap.cs Thu Nov 17 08:53:57 2011
@@ -32,6 +32,7 @@ namespace Lucene.Net.Support
     [Serializable]
     public class HashMap<TKey, TValue> : IDictionary<TKey, TValue>
     {
+        private EqualityComparer<TKey> _comparer;
         private Dictionary<TKey, TValue> _dict;
 
         // Indicates if a null key has been assigned, used for iteration
@@ -46,6 +47,7 @@ namespace Lucene.Net.Support
         public HashMap(int initialCapacity)
         {
             _dict = new Dictionary<TKey, TValue>(initialCapacity);
+            _comparer = EqualityComparer<TKey>.Default;
             _hasNullValue = false;
         }
 
@@ -91,7 +93,7 @@ namespace Lucene.Net.Support
 
         void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
         {
-            if (item.Key.Equals(default(TKey)))
+            if (_comparer.Equals(item.Key, default(TKey)))
             {
                 _hasNullValue = true;
                 _nullValue = item.Value;
@@ -111,7 +113,7 @@ namespace Lucene.Net.Support
 
         bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
         {
-            if (item.Key.Equals(default(TKey)))
+            if (_comparer.Equals(item.Key, default(TKey)))
             {
                 return _hasNullValue && EqualityComparer<TValue>.Default.Equals(item.Value, _nullValue);
             }
@@ -126,7 +128,7 @@ namespace Lucene.Net.Support
 
         public bool Remove(KeyValuePair<TKey, TValue> item)
         {
-            if (item.Key.Equals(default(TKey)))
+            if (_comparer.Equals(item.Key, default(TKey)))
             {
                 if (!_hasNullValue)
                     return false;
@@ -155,9 +157,13 @@ namespace Lucene.Net.Support
 
         public bool ContainsKey(TKey key)
         {
-            if (key.Equals(default(TKey)) && _hasNullValue)
+            if (_comparer.Equals(key, default(TKey)))
             {
-                return true;
+                if (_hasNullValue)
+                {
+                    return true;
+                }
+                return false;
             }
 
             return _dict.ContainsKey(key);
@@ -165,7 +171,7 @@ namespace Lucene.Net.Support
 
         public void Add(TKey key, TValue value)
         {
-            if (key.Equals(default(TKey)))
+            if (_comparer.Equals(key, default(TKey)))
             {
                 _hasNullValue = true;
                 _nullValue = value;
@@ -185,7 +191,7 @@ namespace Lucene.Net.Support
 
         public bool Remove(TKey key)
         {
-            if (key.Equals(default(TKey)))
+            if (_comparer.Equals(key, default(TKey)))
             {
                 _hasNullValue = false;
                 _nullValue = default(TValue);
@@ -199,7 +205,7 @@ namespace Lucene.Net.Support
 
         public bool TryGetValue(TKey key, out TValue value)
         {
-            if (key.Equals(default(TKey)))
+            if (_comparer.Equals(key, default(TKey)))
             {
                 if (_hasNullValue)
                 {
@@ -220,7 +226,7 @@ namespace Lucene.Net.Support
         {
             get
             {
-                if (key.Equals(default(TKey)))
+                if (_comparer.Equals(key, default(TKey)))
                 {
                     if (!_hasNullValue)
                     {
@@ -232,7 +238,7 @@ namespace Lucene.Net.Support
             }
             set
             {
-                if (key.Equals(default(TKey)))
+                if (_comparer.Equals(key, default(TKey)))
                 {
                     _nullValue = value;
                 }

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Analysis/TestAnalyzers.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Analysis/TestAnalyzers.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Analysis/TestAnalyzers.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Analysis/TestAnalyzers.cs Thu Nov 17 08:53:57 2011
@@ -32,10 +32,9 @@ namespace Lucene.Net.Analysis
 	[TestFixture]
 	public class TestAnalyzers : BaseTokenStreamTestCase
 	{
-        // NOTE: This was commented out before -cc
-		public TestAnalyzers(System.String name) : base(name)
-		{
-		}
+        //public TestAnalyzers(System.String name) : base(name)
+        //{
+        //}
 		
 		[Test]
 		public virtual void  TestSimple()

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/AssemblyInfo.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/AssemblyInfo.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/AssemblyInfo.cs Thu Nov 17 08:53:57 2011
@@ -37,7 +37,7 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyDefaultAlias("Lucene.Net")]
 [assembly: AssemblyCulture("")]
 
-[assembly: AssemblyInformationalVersionAttribute("2.9.4")]
+[assembly: AssemblyInformationalVersionAttribute("3.0.3")]
 
 //
 // Version information for an assembly consists of the following four values:
@@ -50,7 +50,7 @@ using System.Runtime.CompilerServices;
 // You can specify all the values or you can default the Revision and Build Numbers 
 // by using the '*' as shown below:
 
-[assembly: AssemblyVersion("2.9.4.001")]
+[assembly: AssemblyVersion("3.0.3")]
 
 //
 // In order to sign your assembly you must specify a key to use. Refer to the 

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestConcurrentMergeScheduler.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestConcurrentMergeScheduler.cs?rev=1203112&r1=1203111&r2=1203112&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestConcurrentMergeScheduler.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestConcurrentMergeScheduler.cs Thu Nov 17 08:53:57 2011
@@ -53,7 +53,7 @@ namespace Lucene.Net.Index
 			
 			public override void  Eval(MockRAMDirectory dir)
 			{
-				if (doFail && Thread.CurrentThread.Name.Equals("main")) // TODO: This may not work -cc
+				if (doFail)// && Thread.CurrentThread.Name.Equals("main")) // TODO: This does not work -cc
 				{
 					System.Diagnostics.StackTrace trace = new System.Diagnostics.StackTrace();
 					for (int i = 0; i < trace.FrameCount; i++)



Mime
View raw message