Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors property path evaluation logic in
FilterEvaluator.cs
to improve null safety and correctness when navigating nested properties in query expressions. The main changes involve introducing guarded property path evaluation, handling null comparisons more robustly, and updating related methods to use the new approach.Property Path Evaluation & Null Safety
BuildPropertyPathWithGuard
to safely build property paths with guard expressions, ensuring null checks are applied when navigating nested properties. All relevant evaluation methods now use this function instead of the previousBuildPropertyPath
.EvaluatePropertyPathExpression
and lambda property path handling to use guard expressions and combine them with value comparisons, improving null handling for complex queries. [1] [2]Null Comparison Logic
ComposeNestedNullComparison
to handle equality and inequality operations with null values on nested properties, using guard expressions to prevent null reference errors.RequiresFinalNotNull
helper to determine when additional null checks are needed for the final property in a path, ensuring correct logical behavior in comparisons.Code Consistency & Minor Cleanups
ResolveCollectionProperty
to ensure proper casting toMemberExpression
.