lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [18/18] lucenenet git commit: TODOs
Date Tue, 06 Jan 2015 03:46:34 GMT
TODOs


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f09cd685
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f09cd685
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f09cd685

Branch: refs/heads/master
Commit: f09cd685e2a7caed4c2350408ea43ffd8665076f
Parents: a098c0b
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Tue Jan 6 02:59:26 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Tue Jan 6 02:59:26 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/IndexReader.cs                | 9 +++++----
 src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f09cd685/src/Lucene.Net.Core/Index/IndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexReader.cs b/src/Lucene.Net.Core/Index/IndexReader.cs
index f0fd9fa..9679453 100644
--- a/src/Lucene.Net.Core/Index/IndexReader.cs
+++ b/src/Lucene.Net.Core/Index/IndexReader.cs
@@ -78,7 +78,7 @@ namespace Lucene.Net.Index
         private bool ClosedByChild = false;
         private readonly AtomicInteger refCount = new AtomicInteger(1);
 
-        internal IndexReader()
+        protected IndexReader()
         {
             if (!(this is CompositeReader || this is AtomicReader))
             {
@@ -148,6 +148,7 @@ namespace Lucene.Net.Index
             {
                 foreach (ReaderClosedListener listener in ReaderClosedListeners)
                 {
+                    // LUCENENET TODO
                     /*try
                     {*/
                     listener.OnClose(this);
@@ -328,7 +329,7 @@ namespace Lucene.Net.Index
         /// <summary>
         /// {@inheritDoc}
         /// <p>For caching purposes, {@code IndexReader} subclasses are not allowed
-        /// to implement equals/hashCode, so methods are declared final.
+        /// to implement equals/hashCode, so methods are declared sealed.
         /// To lookup instances from caches use <seealso cref="#getCoreCacheKey"/>
and
         /// <seealso cref="#getCombinedCoreAndDeletesKey"/>.
         /// </summary>
@@ -514,7 +515,7 @@ namespace Lucene.Net.Index
         // IndexableField
         public Document Document(int docID)
         {
-            DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor();
+            var visitor = new DocumentStoredFieldVisitor();
             Document(docID, visitor);
             return visitor.Document;
         }
@@ -526,7 +527,7 @@ namespace Lucene.Net.Index
         /// </summary>
         public Document Document(int docID, ISet<string> fieldsToLoad)
         {
-            DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor(fieldsToLoad);
+            var visitor = new DocumentStoredFieldVisitor(fieldsToLoad);
             Document(docID, visitor);
             return visitor.Document;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f09cd685/src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs b/src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs
index 8c785bd..e1d0bef 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexReaderClose.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Index
         [Test]
         public virtual void TestCloseUnderException()
         {
-            int iters = 1000 + 1 + Random().Next(20);
+            int iters = 1000 + 1 + Random().Next(20); // LUCENENET TODO why so many times?
maybe switch to nightly?
             for (int j = 0; j < iters; j++)
             {
                 Directory dir = NewDirectory();


Mime
View raw message