Github user synhershko commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/168#discussion_r60711321
  
    --- Diff: src/Lucene.Net.Tests/core/Index/TestIndexWriterWithThreads.cs ---
    @@ -657,7 +655,7 @@ public virtual void TestRollbackAndCommitWithThreads()
                 }
     
                 Assert.IsTrue(!failed.Get());
    -            writerRef.Value.Dispose();
    +            writerRef.Dispose();
    --- End diff --
    
    this will try to dispose of the local reference, not the reference that may 
have been updated within `ThreadAnonymousInnerClassHelper`. This is why 
writerRef was originally boxed - so if the reference changes we dispose of the 
correct instance. Can you compare with the Java version to verify correctness?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to