Skip to content

Commit

Permalink
Make bean property method accessible as well (for non-public types)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Jul 25, 2023
1 parent 019c34f commit 021161e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public Object getFieldValue(String field) {

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);
}

Expand Down

0 comments on commit 021161e

Please sign in to comment.