Skip to content

Commit

Permalink
Fix Querydsl Nullability annotations.
Browse files Browse the repository at this point in the history
Closes #2044
  • Loading branch information
mp911de committed Jan 22, 2025
1 parent 0d76b47 commit 613ee5f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public interface MultiValueBinding<T extends Path<? extends S>, S> {
*
* @param path {@link Path} to the property. Will not be {@literal null}.
* @param value the value that should be bound. Will not be {@literal null} or empty.
* @return can be {@literal null}, in which case the binding will not be incorporated in the overall
* @return can be {@link Optional#empty()}, in which case the binding will not be incorporated in the overall
* {@link Predicate}.
*/
Optional<Predicate> bind(T path, Collection<? extends S> value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public interface OptionalValueBinding<T extends Path<? extends S>, S> {

/**
* Returns the predicate to be applied to the given {@link Path} for the given value. The given value will be the
* first the first one provided for the given path and converted into the expected type.
* first one provided for the given path and converted into the expected type.
*
* @param path {@link Path} to the property. Will not be {@literal null}.
* @param value the value that should be bound. Will not be {@literal null}.
* @return can be {@literal null}, in which case the binding will not be incorporated in the overall {@link Predicate}
* .
* @return can be {@link Optional#empty()}, in which case the binding will not be incorporated in the overall
* {@link Predicate} .
*/
Optional<Predicate> bind(T path, Optional<? extends S> value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ interface PathInformation {
/**
* Tries to reify a Querydsl {@link Path} from the given {@link PropertyPath} and base.
*
* @param path must not be {@literal null}.
* @param base can be {@literal null}.
* @param resolver must not be {@literal null}.
* @return
*/
Path<?> reifyPath(EntityPathResolver resolver);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.springframework.data.querydsl.binding;

import org.springframework.lang.Nullable;

import com.querydsl.core.types.Path;
import com.querydsl.core.types.Predicate;

Expand All @@ -31,12 +33,13 @@ public interface SingleValueBinding<T extends Path<? extends S>, S> {

/**
* Returns the predicate to be applied to the given {@link Path} for the given value. The given value will be the
* first the first one provided for the given path and converted into the expected type.
* first one provided for the given path and converted into the expected type.
*
* @param path {@link Path} to the property. Will not be {@literal null}.
* @param value the value that should be bound. Will not be {@literal null}.
* @return can be {@literal null}, in which case the binding will not be incorporated in the overall {@link Predicate}
* .
* @return can be {@literal null}, in which case the binding will not be incorporated in the overall
* {@link Predicate}.
*/
@Nullable
Predicate bind(T path, S value);
}

0 comments on commit 613ee5f

Please sign in to comment.