From 4187a332783036a8c020dcb64289919d6623e78b Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 17 Jan 2025 21:45:36 +0700 Subject: [PATCH] Lucene.Net.Util.RandomizedContext: Updated comments --- .../Support/Util/RandomizedContext.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Lucene.Net.TestFramework/Support/Util/RandomizedContext.cs b/src/Lucene.Net.TestFramework/Support/Util/RandomizedContext.cs index 51357e526a..e198e18626 100644 --- a/src/Lucene.Net.TestFramework/Support/Util/RandomizedContext.cs +++ b/src/Lucene.Net.TestFramework/Support/Util/RandomizedContext.cs @@ -204,8 +204,8 @@ internal void DisposeResources() UninterruptableMonitor.Enter(contextLock); try { - resources = disposableResources; - disposableResources = null; + resources = disposableResources; // Set the resources to a local variable + disposableResources = null; // Set disposableResources field to null so our local list will go out of scope when we are done } finally { @@ -245,7 +245,7 @@ internal void DisposeResources() ExceptionDispatchInfo.Capture(th).Throw(); // LUCENENET: Rethrow to preserve stack details from the original throw } } - } // toDispose goes out of scope here - no need to Clear(). + } // resources goes out of scope here - no need to Clear(). /// /// Prints a stack trace of the to the destination .