@@ -43,9 +43,9 @@ public interface Specification<T> extends Serializable {
43
43
/**
44
44
* Negates the given {@link Specification}.
45
45
*
46
- * @param <T>
46
+ * @param <T> the type of the {@link Root} the resulting {@literal Specification} operates on.
47
47
* @param spec can be {@literal null}.
48
- * @return
48
+ * @return guaranteed to be not {@literal null}.
49
49
* @since 2.0
50
50
*/
51
51
static <T > Specification <T > not (@ Nullable Specification <T > spec ) {
@@ -58,9 +58,9 @@ static <T> Specification<T> not(@Nullable Specification<T> spec) {
58
58
/**
59
59
* Simple static factory method to add some syntactic sugar around a {@link Specification}.
60
60
*
61
- * @param <T>
61
+ * @param <T> the type of the {@link Root} the resulting {@literal Specification} operates on.
62
62
* @param spec can be {@literal null}.
63
- * @return
63
+ * @return guaranteed to be not {@literal null}.
64
64
* @since 2.0
65
65
*/
66
66
static <T > Specification <T > where (@ Nullable Specification <T > spec ) {
@@ -76,7 +76,7 @@ static <T> Specification<T> where(@Nullable Specification<T> spec) {
76
76
*/
77
77
78
78
default Specification <T > and (@ Nullable Specification <T > other ) {
79
- return composed (this , other , ( builder , left , rhs ) -> builder . and ( left , rhs ) );
79
+ return composed (this , other , CriteriaBuilder :: and );
80
80
}
81
81
82
82
/**
@@ -87,7 +87,7 @@ default Specification<T> and(@Nullable Specification<T> other) {
87
87
* @since 2.0
88
88
*/
89
89
default Specification <T > or (@ Nullable Specification <T > other ) {
90
- return composed (this , other , ( builder , left , rhs ) -> builder . or ( left , rhs ) );
90
+ return composed (this , other , CriteriaBuilder :: or );
91
91
}
92
92
93
93
/**
0 commit comments