mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Address review comments.
This commit is contained in:
@@ -165,7 +165,7 @@ namespace Semmle.Extraction
|
||||
if (init is null) throw new ArgumentException("Unexpected null value", nameof(init));
|
||||
|
||||
if (objectEntityCache.TryGetValue(init, out var cached))
|
||||
return (Entity)cached!;
|
||||
return (Entity)cached;
|
||||
|
||||
using (StackGuard)
|
||||
{
|
||||
|
||||
@@ -34,12 +34,7 @@ namespace Semmle.Extraction
|
||||
|
||||
public override string ToString() => "*";
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
// Expand logic to allow for nullability control flow analysis
|
||||
if (obj is null) return false;
|
||||
return obj.GetType() == GetType();
|
||||
}
|
||||
public override bool Equals(object? obj) => obj?.GetType() == GetType();
|
||||
|
||||
public override int GetHashCode() => 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user