Skip to content

Commit 47ded39

Browse files
quaffchristophstrobl
authored andcommitted
Fix warnings for passing 'null' argument to parameter annotated as non nullable.
Relates to: #3036 Closes: #3468
1 parent b47b454 commit 47ded39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public Page<T> findAll(Pageable pageable) {
431431
return new PageImpl<>(findAll());
432432
}
433433

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

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

485485
if (spec != null) {
486-
Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), null, builder);
486+
Predicate predicate = spec.toPredicate(delete.from(getDomainClass()), builder.createQuery(getDomainClass()), builder);
487487

488488
if (predicate != null) {
489489
delete.where(predicate);

0 commit comments

Comments
 (0)