Make bean property method accessible as well (for non-public types)
See gh-19877
This commit is contained in:
parent
019c34f480
commit
021161ea38
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue