Move off deprecated API.

See #3305
Original pull request: #3307
This commit is contained in:
Christoph Strobl
2025-06-04 11:52:13 +02:00
committed by Mark Paluch
parent b97cc46469
commit a0d8c7fa5f
3 changed files with 5 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import org.jspecify.annotations.Nullable;
import org.springframework.data.domain.Limit;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -41,7 +42,6 @@ import org.springframework.data.util.NullableWrapperConverters;
import org.springframework.data.util.ReactiveWrappers;
import org.springframework.data.util.ReflectionUtils;
import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;

View File

@@ -19,6 +19,7 @@ import kotlin.reflect.KFunction;
import java.lang.annotation.ElementType;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -245,8 +246,8 @@ public class NullnessMethodInvocationValidator implements MethodInterceptor {
@Override
public int hashCode() {
int result = (nullableReturn ? 1 : 0);
result = (31 * result) + ObjectUtils.nullSafeHashCode(nullableParameters);
result = (31 * result) + ObjectUtils.nullSafeHashCode(methodParameters);
result = (31 * result) + Arrays.hashCode(nullableParameters);
result = (31 * result) + Arrays.hashCode(methodParameters);
return result;
}

View File

@@ -23,7 +23,6 @@ import java.util.Optional;
import java.util.function.Consumer;
import org.jspecify.annotations.Nullable;
import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.MergedAnnotation;
import org.springframework.core.annotation.MergedAnnotations;
@@ -126,7 +125,7 @@ public abstract class SortHandlerMethodArgumentResolverSupport {
protected Sort getDefaultFromAnnotationOrFallback(MethodParameter parameter) {
MergedAnnotations mergedAnnotations = MergedAnnotations.from(parameter, parameter.getParameterAnnotations(),
RepeatableContainers.of(SortDefault.class, SortDefaults.class));
RepeatableContainers.explicitRepeatable(SortDefault.class, SortDefaults.class));
List<MergedAnnotation<SortDefault>> annotations = mergedAnnotations.stream(SortDefault.class).toList();