Add reflection hints for HttpEntity

For those used in Web controllers.

Closes gh-28622
This commit is contained in:
Sébastien Deleuze
2022-06-20 18:08:44 +02:00
parent 789329fa3b
commit 93b340e563
3 changed files with 110 additions and 9 deletions

View File

@@ -38,6 +38,7 @@ import org.springframework.aot.hint.TypeHint.Builder;
import org.springframework.core.KotlinDetector;
import org.springframework.core.MethodParameter;
import org.springframework.core.ResolvableType;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
/**
@@ -123,8 +124,8 @@ public class BindingReflectionHintsRegistrar {
}
}
private void collectReferencedTypes(Set<Type> seen, Set<Class<?>> types, Type type) {
if (seen.contains(type)) {
private void collectReferencedTypes(Set<Type> seen, Set<Class<?>> types, @Nullable Type type) {
if (type == null || seen.contains(type)) {
return;
}
seen.add(type);