mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Make bean property method accessible as well (for non-public types)
See gh-19877
This commit is contained in:
@@ -132,6 +132,7 @@ public class SimpleErrors implements Errors, Serializable {
|
||||
|
||||
PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(this.target.getClass(), field);
|
||||
if (pd != null && pd.getReadMethod() != null) {
|
||||
ReflectionUtils.makeAccessible(pd.getReadMethod());
|
||||
return ReflectionUtils.invokeMethod(pd.getReadMethod(), this.target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user