Skip to content

QuerydslPredicateBuilder should not return null Predicate #2396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mp911de opened this issue Jun 28, 2021 · 0 comments
Closed

QuerydslPredicateBuilder should not return null Predicate #2396

mp911de opened this issue Jun 28, 2021 · 0 comments
Assignees
Labels
type: task A general task

Comments

@mp911de
Copy link
Member

mp911de commented Jun 28, 2021

To improve null-safety, Querydsl predicates should not be null. Also, QuerydslPredicateExecutor doesn't accept null values so usage of QuerydslPredicateBuilder always requires special handling on the calling side.

@mp911de mp911de added the type: task A general task label Jun 28, 2021
@mp911de mp911de self-assigned this Jun 28, 2021
@mp911de mp911de added this to the 2.5.3 (2021.0.3) milestone Jun 29, 2021
mp911de added a commit that referenced this issue Jun 29, 2021
We now no longer return a null Predicate from QuerydslPredicateBuilder.getPredicate(…) if the input values are empty or if the constraints are empty. Instead, we return an empty BooleanBuilder instance to avoid null handling on the calling side.

HandlerMethodArgumentsResolvers for QuerydslBindings retain their null/Optional.empty semantics.

Closes #2396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant