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

Commit

Permalink
make fields accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Sep 5, 2017
1 parent 1acb379 commit d42a995
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public void injectAttributes() {
FieldWrapper field = entry.getKey();
InjectAttribute annotation = entry.getValue();

try {
field.getField().setAccessible(true);
} catch (SecurityException e) {
log.warn(e.getLocalizedMessage(), e);
}

try {
switch (annotation.type()) {
case BOOLEAN:
Expand Down Expand Up @@ -182,8 +188,7 @@ public void injectAttributes() {
break;
}
} catch (IllegalAccessException iae) {
log.error(iae.getMessage());
iae.printStackTrace();
log.error(iae.getMessage(), iae);
}
index++;
}
Expand All @@ -206,6 +211,12 @@ public void injectResources() {
logFieldTypeMissmatch(field.getField(), annotation.type().getClazz());
}

try {
field.getField().setAccessible(true);
} catch (SecurityException e) {
log.warn(e.getLocalizedMessage(), e);
}

try {
switch (annotation.type()) {
case ANIMATION:
Expand Down

0 comments on commit d42a995

Please sign in to comment.