Skip to content

Commit 2891373

Browse files
Move off deprecated API
1 parent 84e5088 commit 2891373

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/main/java/org/springframework/data/convert/PropertyValueConverterFactories.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ static class BeanFactoryAwarePropertyValueConverterFactory implements PropertyVa
125125
PropertyValueConverter<DV, SV, C> converter = beanFactory.getBeanProvider(converterType).getIfAvailable();
126126

127127
if (converter == null && beanFactory instanceof AutowireCapableBeanFactory) {
128-
return (PropertyValueConverter<DV, SV, C>) ((AutowireCapableBeanFactory) beanFactory).createBean(converterType,
129-
AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, false);
128+
return (PropertyValueConverter<DV, SV, C>) ((AutowireCapableBeanFactory) beanFactory).createBean(converterType);
130129
}
131130

132131
return converter;

src/main/java/org/springframework/data/repository/query/QueryMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.function.Predicate;
2323
import java.util.stream.Stream;
2424

25+
import org.jspecify.annotations.Nullable;
2526
import org.springframework.data.domain.Limit;
2627
import org.springframework.data.domain.Page;
2728
import org.springframework.data.domain.Pageable;
@@ -41,7 +42,6 @@
4142
import org.springframework.data.util.ReactiveWrappers;
4243
import org.springframework.data.util.ReflectionUtils;
4344
import org.springframework.data.util.TypeInformation;
44-
import org.springframework.lang.Nullable;
4545
import org.springframework.util.Assert;
4646
import org.springframework.util.ClassUtils;
4747

src/main/java/org/springframework/data/util/NullnessMethodInvocationValidator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.lang.annotation.ElementType;
2121
import java.lang.reflect.Method;
22+
import java.util.Arrays;
2223
import java.util.Map;
2324
import java.util.concurrent.ConcurrentHashMap;
2425

@@ -245,8 +246,8 @@ public boolean equals(@Nullable Object o) {
245246
@Override
246247
public int hashCode() {
247248
int result = (nullableReturn ? 1 : 0);
248-
result = (31 * result) + ObjectUtils.nullSafeHashCode(nullableParameters);
249-
result = (31 * result) + ObjectUtils.nullSafeHashCode(methodParameters);
249+
result = (31 * result) + Arrays.hashCode(nullableParameters);
250+
result = (31 * result) + Arrays.hashCode(methodParameters);
250251
return result;
251252
}
252253

src/main/java/org/springframework/data/web/SortHandlerMethodArgumentResolverSupport.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.util.function.Consumer;
2424

2525
import org.jspecify.annotations.Nullable;
26-
2726
import org.springframework.core.MethodParameter;
2827
import org.springframework.core.annotation.MergedAnnotation;
2928
import org.springframework.core.annotation.MergedAnnotations;
@@ -126,7 +125,7 @@ public void setFallbackSort(Sort fallbackSort) {
126125
protected Sort getDefaultFromAnnotationOrFallback(MethodParameter parameter) {
127126

128127
MergedAnnotations mergedAnnotations = MergedAnnotations.from(parameter, parameter.getParameterAnnotations(),
129-
RepeatableContainers.of(SortDefault.class, SortDefaults.class));
128+
RepeatableContainers.explicitRepeatable(SortDefault.class, SortDefaults.class));
130129

131130
List<MergedAnnotation<SortDefault>> annotations = mergedAnnotations.stream(SortDefault.class).toList();
132131

0 commit comments

Comments
 (0)