Skip to content

Commit

Permalink
Fixes #4225
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Dec 20, 2019
1 parent d48de32 commit 8af951f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,14 @@ public String toString() {
if (MethodUtils.isGetter(method)) {
String name = method.getName();
String key = calculateAttributeFromGetter(name);

try {
getClass().getField(key);
} catch (NoSuchFieldException e) {
// ignore
continue;
}

Object value = method.invoke(this);
if (value != null) {
buf.append(" ");
Expand Down

0 comments on commit 8af951f

Please sign in to comment.