Skip to content

Commit ba6f84e

Browse files
Remove Specification.where method in favour of all()
Gentle reminder to deprecate where before we remove it here
1 parent 6c98441 commit ba6f84e

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,6 @@ static <T> Specification<T> all() {
5656
return (root, query, builder) -> null;
5757
}
5858

59-
/**
60-
* Simple static factory method to add some syntactic sugar around a {@link Specification}.
61-
*
62-
* @param <T> the type of the {@link Root} the resulting {@literal Specification} operates on.
63-
* @param spec must not be {@literal null}.
64-
* @return guaranteed to be not {@literal null}.
65-
* @since 2.0
66-
*/
67-
static <T> Specification<T> where(Specification<T> spec) {
68-
69-
Assert.notNull(spec, "Specification must not be null");
70-
71-
return spec;
72-
}
73-
7459
/**
7560
* Simple static factory method to add some syntactic sugar translating {@link PredicateSpecification} to
7661
* {@link Specification}.
@@ -83,7 +68,7 @@ static <T> Specification<T> where(PredicateSpecification<T> spec) {
8368

8469
Assert.notNull(spec, "PredicateSpecification must not be null");
8570

86-
return where((root, update, criteriaBuilder) -> spec.toPredicate(root, criteriaBuilder));
71+
return (root, update, criteriaBuilder) -> spec.toPredicate(root, criteriaBuilder);
8772
}
8873

8974
/**

0 commit comments

Comments
 (0)