NightOwl888 commented on code in PR #914: URL: https://github.com/apache/lucenenet/pull/914#discussion_r1501998524
########## 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: Ahh, okay. Yeah, NRT can also mean Near Real-Time in Lucene, so that is a bit confusing. Actually, you can enable nullable reference types for an individual file by using `#nullable enable`. And if you need to disable it further down in the file, you can use `#nullable restore`. We do that in several files throughout the solution. However, do note that enabling it in one file doesn't mean that file is "finished" because any dependencies that are later changed to have nullable reference type support may alter the validity current file. Chipping away at it one file at a time is probably best because you really have to have your head in the code that you are working on to make sure it is done right. There is a more in-depth discussion of this here: https://github.com/apache/lucenenet/issues/737 -- 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