DATACMNS-1781 - Move off deprecated Spring Framework API.

Use KotlinDetector instead of ReflectionUtils.isKotlinClass(…). Use replacement MethodParameter(…).withContainingClass(…) instead of GenericTypeResolver.resolveParameterType(…). Use MergedAnnotations.from(…).isPresent(…) instead of AnnotationUtils.isAnnotationMetaPresent(…).
This commit is contained in:
Mark Paluch
2020-08-04 12:16:55 +02:00
parent bb4d621a32
commit a600d8160c
9 changed files with 19 additions and 24 deletions

View File

@@ -34,6 +34,7 @@ import javax.annotation.Nonnull;
import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.annotation.MergedAnnotations;
import org.springframework.lang.NonNullApi;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
@@ -159,7 +160,7 @@ public abstract class NullableUtils {
return true;
}
if (!AnnotationUtils.isAnnotationMetaPresent(annotation.annotationType(), annotationClass)
if (!MergedAnnotations.from(annotation.annotationType()).isPresent(annotationClass)
|| !isNonNull(annotation)) {
return false;
}