This commit is contained in:
Jesse Boyd 2018-04-17 17:28:07 +10:00
parent 72d85e0754
commit 5298c5401f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -109,8 +109,12 @@ public class ReflectionUtils {
modifiers &= ~Modifier.FINAL;
modifiersField.setInt(field, modifiers);
FieldAccessor fa = ReflectionFactory.getReflectionFactory().newFieldAccessor(field, false);
fa.set(target, value);
try {
FieldAccessor fa = ReflectionFactory.getReflectionFactory().newFieldAccessor(field, false);
fa.set(target, value);
} catch (NoSuchMethodError error) {
field.set(target, value);
}
}
private static void blankField(Class<?> enumClass, String fieldName)