Skip to content

Improve null/default check after async query result#524

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

Improve null/default check after async query result#524
StuartFerguson merged 1 commit into
mainfrom
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 merged commit a4b9c49 into main Mar 30, 2026
5 checks passed
@github-actions github-actions Bot deleted the bug/#512_comparison_change branch May 30, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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