Skip to content

Commit

Permalink
Fix warnings for passing 'null' argument to parameter annotated as no…
Browse files Browse the repository at this point in the history
…n nullable.

Relates to: spring-projects#3036
Closes: spring-projects#3468
  • Loading branch information
quaff authored and christophstrobl committed Jun 21, 2024
1 parent 021feda commit 206c4f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public Page<T> findAll(Pageable pageable) {
return new PageImpl<>(findAll());
}

return findAll((Specification<T>) null, pageable);
return findAll((root, query, criteriaBuilder) -> null, pageable);
}

@Override
Expand Down Expand Up @@ -483,7 +483,7 @@ public long delete(Specification<T> spec) {
CriteriaDelete<T> delete = builder.createCriteriaDelete(getDomainClass());

if (spec != null) {
Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), null, builder);
Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), builder.createQuery(getDomainClass()), builder);

if (predicate != null) {
delete.where(predicate);
Expand Down

0 comments on commit 206c4f5

Please sign in to comment.