File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
spring-data-jpa/src/main/java/org/springframework/data/jpa/domain Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -68,20 +68,18 @@ static <T> Specification<T> not(@Nullable Specification<T> spec) {
6868 : (root , query , builder ) -> {
6969
7070 Predicate predicate = spec .toPredicate (root , query , builder );
71- return predicate != null ? builder .not (predicate ) : builder . disjunction () ;
71+ return predicate != null ? builder .not (predicate ) : null ;
7272 };
7373 }
7474
7575 /**
7676 * Simple static factory method to create a specification which does not participate in matching. The specification
7777 * returned is {@code null}-like, and is elided in all operations.
7878 *
79- * <pre>
80- * {@code
79+ * <pre class="code">
8180 * unrestricted().and(other) // consider only `other`
8281 * unrestricted().or(other) // consider only `other`
8382 * not(unrestricted()) // equivalent to `unrestricted()`
84- * }
8583 * </pre>
8684 *
8785 * @param <T> the type of the {@link Root} the resulting {@literal Specification} operates on.
Original file line number Diff line number Diff line change 3131 * @author Oliver Gierke
3232 * @author Jens Schauder
3333 * @author Mark Paluch
34- * @see Specification
3534 * @since 2.2
35+ * @see Specification
3636 */
3737class SpecificationComposition {
3838
You can’t perform that action at this time.
0 commit comments