Skip to content

Commit 7b1a240

Browse files
Potential fix for code scanning alert no. 2302: Equals should not apply "is"
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 07209a6 commit 7b1a240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi/Expressions/RuntimeExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public override bool Equals(object? obj)
9494
{
9595
return true;
9696
}
97-
return obj is RuntimeExpression runtimeExpression && Equals(runtimeExpression);
97+
return obj.GetType() == GetType() && Equals((RuntimeExpression)obj);
9898
}
9999

100100
/// <inheritdoc />

0 commit comments

Comments
 (0)