Skip to content

Commit

Permalink
Optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhpo committed Nov 14, 2023
1 parent 58dbcf6 commit 721e7d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void serialize(String fieldValue, JsonGenerator gen, SerializerProvider s
return;
}

Class<?> object = gen.getCurrentValue().getClass();
Field field = ReflectUtil.getField(object, fieldName);
Object object = gen.getCurrentValue();
Field field = ReflectUtil.getField(object.getClass(), fieldName);
Sensitive sensitive = field.getAnnotation(Sensitive.class);
if (Objects.isNull(sensitive)) {
gen.writeString(fieldValue);
Expand Down

0 comments on commit 721e7d9

Please sign in to comment.