Skip to content

Improve null/default check after async query result#524

Merged
StuartFerguson merged 1 commit intomainfrom
bug/#512_comparison_change
Mar 30, 2026
Merged

Improve null/default check after async query result#524
StuartFerguson merged 1 commit intomainfrom
bug/#512_comparison_change

Conversation

@StuartFerguson
Copy link
Copy Markdown
Member

Updated the logic for detecting "not found" results after asynchronous queries by replacing item == null with EqualityComparer.Default.Equals(item, default(T)). This ensures correct handling for both reference and value types when checking for default values.

closes #512

Updated the logic for detecting "not found" results after asynchronous queries by replacing item == null with EqualityComparer<T>.Default.Equals(item, default(T)). This ensures correct handling for both reference and value types when checking for default values.
@StuartFerguson StuartFerguson added the bug Bugs and error-prone code label Mar 30, 2026
@StuartFerguson StuartFerguson merged commit a4b9c49 into main Mar 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs and error-prone code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ErrorProne] Use a comparison to 'default(T)' instead or add a constraint to 'T' so that it can't be a value type.

1 participant