mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 22:19:03 +00:00
Do not attempt nested PropertyHandler resolution for argument conversion
Includes fix for return type declaration in PropertyAccessor subclasses. See gh-36024
This commit is contained in:
+3
@@ -485,6 +485,9 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
|
||||
|
||||
@Override
|
||||
public @Nullable Class<?> getPropertyType(String propertyName) throws BeansException {
|
||||
if (this.wrappedObject == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
PropertyHandler ph = getPropertyHandler(propertyName);
|
||||
if (ph != null) {
|
||||
|
||||
@@ -189,7 +189,7 @@ public class BeanWrapperImpl extends AbstractNestablePropertyAccessor implements
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable BeanPropertyHandler getLocalPropertyHandler(String propertyName) {
|
||||
protected @Nullable PropertyHandler getLocalPropertyHandler(String propertyName) {
|
||||
PropertyDescriptor pd = getCachedIntrospectionResults().getPropertyDescriptor(propertyName);
|
||||
return (pd != null ? new BeanPropertyHandler((GenericTypeAwarePropertyDescriptor) pd) : null);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DirectFieldAccessor extends AbstractNestablePropertyAccessor {
|
||||
|
||||
|
||||
@Override
|
||||
protected @Nullable FieldPropertyHandler getLocalPropertyHandler(String propertyName) {
|
||||
protected @Nullable PropertyHandler getLocalPropertyHandler(String propertyName) {
|
||||
FieldPropertyHandler propertyHandler = this.fieldMap.get(propertyName);
|
||||
if (propertyHandler == null) {
|
||||
Field field = ReflectionUtils.findField(getWrappedClass(), propertyName);
|
||||
|
||||
Reference in New Issue
Block a user