DATACMNS-1141 - Add missing NonNullApi and Nullable annotations.
Add Nullable annotation to ParsingUtils, Sort.Order and PropertyValueProvider. Add getRequiredAnnotation(…) to PersistentEntity and PersistentProperty to provide methods returning required, non-null annotations.
This commit is contained in:
@@ -414,7 +414,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
* @param direction can be {@literal null}, will default to {@link Sort#DEFAULT_DIRECTION}
|
||||
* @param property must not be {@literal null} or empty.
|
||||
*/
|
||||
public Order(Direction direction, String property) {
|
||||
public Order(@Nullable Direction direction, String property) {
|
||||
this(direction, property, DEFAULT_IGNORE_CASE, DEFAULT_NULL_HANDLING);
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
* @param property must not be {@literal null} or empty.
|
||||
* @param nullHandling must not be {@literal null}.
|
||||
*/
|
||||
public Order(Direction direction, String property, NullHandling nullHandlingHint) {
|
||||
public Order(@Nullable Direction direction, String property, NullHandling nullHandlingHint) {
|
||||
this(direction, property, DEFAULT_IGNORE_CASE, nullHandlingHint);
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
|
||||
* @param nullHandling must not be {@literal null}.
|
||||
* @since 1.7
|
||||
*/
|
||||
private Order(Direction direction, String property, boolean ignoreCase, NullHandling nullHandling) {
|
||||
private Order(@Nullable Direction direction, String property, boolean ignoreCase, NullHandling nullHandling) {
|
||||
|
||||
if (!StringUtils.hasText(property)) {
|
||||
throw new IllegalArgumentException("Property must not null or empty!");
|
||||
|
||||
Reference in New Issue
Block a user