Skip to content

Commit

Permalink
bug fix #3601
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jan 10, 2021
1 parent 7ac0e06 commit b584203
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -852,9 +852,12 @@ private static Member getEnumValueField(Class clazz) {
for (Field field : clazz.getFields()) {
JSONField jsonField = field.getAnnotation(JSONField.class);

// Returns null if @JSONField is on the enumeration field
if (jsonField != null) {
return null;
if (member != null) {
return null;
}

member = field;
}
}

Expand Down

1 comment on commit b584203

@github-ganyu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果把方法上的@JSONField去掉还是会栈溢出的,这种情况不考虑么?

Please sign in to comment.