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:
Juergen Hoeller
2025-12-17 14:30:44 +01:00
parent c813577908
commit 86e89d53a9
3 changed files with 5 additions and 2 deletions
@@ -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);