Skip to content

Commit

Permalink
Merge pull request #357 from jasta/styles-static-fix
Browse files Browse the repository at this point in the history
Remove static fields from exported properties
  • Loading branch information
jasta committed Feb 26, 2016
2 parents 4dcc54a + ae7c41c commit 28f7b69
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand Down Expand Up @@ -353,6 +354,11 @@ private void getStylesFromObject(
Field[] fields = value.getClass().getFields();

for (Field field : fields) {
int modifiers = field.getModifiers();
if (Modifier.isStatic(modifiers)) {
continue;
}

Object propertyValue;
try {
field.setAccessible(true);
Expand Down

0 comments on commit 28f7b69

Please sign in to comment.