Skip to content

Commit

Permalink
Use is null
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Jan 18, 2025
1 parent 9853bff commit f373682
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Lucene.Net/Support/ExceptionHandling/StackTraceHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static class StackTraceHelper
/// </summary>
public static bool DoesStackTraceContainMethod(string methodName)
{
if (methodName == null)
if (methodName is null)
{
throw new ArgumentNullException(nameof(methodName));
}
Expand Down Expand Up @@ -64,11 +64,11 @@ public static bool DoesStackTraceContainMethod(string methodName)
/// </summary>
public static bool DoesStackTraceContainMethod(string className, string methodName)
{
if (className == null)
if (className is null)
{
throw new ArgumentNullException(nameof(className));
}
if (methodName == null)
if (methodName is null)
{
throw new ArgumentNullException(nameof(methodName));
}
Expand Down Expand Up @@ -100,7 +100,7 @@ public static bool DoesStackTraceContainMethod(string className, string methodNa
[MethodImpl(MethodImplOptions.NoInlining)] // Top frame is skipped, so we don't want to inline
public static void PrintCurrentStackTrace(TextWriter destination)
{
if (destination == null)
if (destination is null)
{
throw new ArgumentNullException(nameof(destination));
}
Expand Down

0 comments on commit f373682

Please sign in to comment.