Skip to content

Commit 42506df

Browse files
committed
Polishing.
Refine Javadoc. See #4023 Original pull request: #4024
1 parent 3f43cee commit 42506df

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
* @author Oliver Gierke
3232
* @author Jens Schauder
3333
* @author Mark Paluch
34-
* @see Specification
3534
* @since 2.2
35+
* @see Specification
3636
*/
3737
class SpecificationComposition {
3838

0 commit comments

Comments
 (0)