Refine QuerydslRepositoryInvokerAdapter nullability assertions.

QuerydslRepositoryInvokerAdapter now rejects null predicates to enforce nullability constraints.

Closes #1501
This commit is contained in:
Mark Paluch
2023-02-24 11:04:01 +01:00
parent 34f212ff61
commit 83655663ea
2 changed files with 11 additions and 2 deletions

View File

@@ -44,13 +44,14 @@ public class QuerydslRepositoryInvokerAdapter implements RepositoryInvoker {
*
* @param delegate must not be {@literal null}.
* @param executor must not be {@literal null}.
* @param predicate can be {@literal null}.
* @param predicate must not be {@literal null}.
*/
public QuerydslRepositoryInvokerAdapter(RepositoryInvoker delegate, QuerydslPredicateExecutor<Object> executor,
Predicate predicate) {
Assert.notNull(delegate, "Delegate RepositoryInvoker must not be null");
Assert.notNull(executor, "QuerydslPredicateExecutor must not be null");
Assert.notNull(predicate, "Predicate must not be null");
this.delegate = delegate;
this.executor = executor;