Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87617946c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// <returns><see langword="true" /> when the candidate satisfies the specification; otherwise, <see langword="false" />.</returns> | ||
| public bool IsSatisfiedBy(T candidate) | ||
| { | ||
| return compiledPredicate.Value(candidate); |
There was a problem hiding this comment.
Guard null candidate in IsSatisfiedBy
Specification<T>.IsSatisfiedBy is a public API but it forwards candidate directly into the compiled expression without validating it first. For reference-type T, a null candidate (for example, a null element in an IEnumerable<T> passed to Where(specification)) will produce expression-dependent runtime failures such as NullReferenceException instead of a deterministic argument error, which breaks the repository rule in AGENTS.md to validate all public method arguments and makes failures harder to diagnose.
Useful? React with 👍 / 👎.
No description provided.