Skip to content

Commit

Permalink
Lucene.Net.Support.Threading.ReentrantLockTest::TestUnlock_IllegalMon…
Browse files Browse the repository at this point in the history
…itorStateException() Removed unused exception variable and added a comment to indicate success so we don't have to suppress warnings
  • Loading branch information
NightOwl888 committed May 24, 2024
1 parent 5f7c1e9 commit 4e1dcc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Lucene.Net.Tests/Support/Threading/ReentrantLockTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ public void TestUnlock_IllegalMonitorStateException()
rl.Unlock();
shouldThrow();
}
#pragma warning disable CS0168 // Variable is declared but never used
catch (SynchronizationLockException success) { }
#pragma warning restore CS0168 // Variable is declared but never used
catch (SynchronizationLockException)
{
// success
}
}

///**
Expand Down

0 comments on commit 4e1dcc9

Please sign in to comment.