NightOwl888 commented on code in PR #914:
URL: https://github.com/apache/lucenenet/pull/914#discussion_r1518643930


##########
src/Lucene.Net.Tests/Search/Spans/TestSpansAdvanced.cs:
##########
@@ -79,16 +82,9 @@ public override void SetUp()
         [TearDown]
         public override void TearDown()
         {
-            if (reader != null)
-            {
-                reader.Dispose();
-            }
-
-            if (mDirectory != null)
-            {
-                mDirectory.Dispose();
-                mDirectory = null;
-            }
+            reader.Dispose();

Review Comment:
   I don't follow. Can you provide an example? This feature is useful because 
it makes it obvious which parameters are designed to accept `null` and those 
that aren't and which methods we can expect to return `null`. It also generates 
warnings which we can either fix or suppress.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to