You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2020/10/03 23:58:46 UTC

[lucenenet] 01/08: BUG: Lucene.Net.Index.IndexFileDeleter: Missing test for Monitor.IsEntered(writer) (as was done in Java)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit fd40e160ae720baa1daae0090c24ca4dbd462782
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Oct 4 01:42:14 2020 +0700

    BUG: Lucene.Net.Index.IndexFileDeleter: Missing test for Monitor.IsEntered(writer) (as was done in Java)
---
 src/Lucene.Net/Index/IndexFileDeleter.cs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Lucene.Net/Index/IndexFileDeleter.cs b/src/Lucene.Net/Index/IndexFileDeleter.cs
index 7aeab61..8edfde6 100644
--- a/src/Lucene.Net/Index/IndexFileDeleter.cs
+++ b/src/Lucene.Net/Index/IndexFileDeleter.cs
@@ -118,8 +118,7 @@ namespace Lucene.Net.Index
 
         // called only from assert
         private bool IsLocked =>
-            //LUCENENET TODO: This always returns true - probably incorrect
-            writer == null || true /*Monitor.IsEntered(writer)*/;
+            writer == null || Monitor.IsEntered(writer);
 
         /// <summary>
         /// Initialize the deleter: find all previous commits in