Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Fixed static field issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkJeongHwan committed Sep 23, 2019
1 parent 51cc040 commit a588382
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/realtimetech/kson/KsonContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.IOException;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
Expand Down Expand Up @@ -196,7 +197,7 @@ private Field[] getAccessibleFields(Class<?> clazz) {

for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true);
if (!fields.contains(field) && !field.isAnnotationPresent(Ignore.class)) {
if (!fields.contains(field) && !field.isAnnotationPresent(Ignore.class) && !Modifier.isStatic(field.getModifiers())) {
fields.add(field);
}
}
Expand Down

0 comments on commit a588382

Please sign in to comment.