Fix IllegalAccessException while initializing an ORM class
This commit is contained in:
parent
d853368f4c
commit
a6f126bcc7
@ -98,6 +98,7 @@ public abstract class SQLElement<E extends SQLElement<E>> {
|
|||||||
java.lang.reflect.Field[] declaredFields = getClass().getDeclaredFields();
|
java.lang.reflect.Field[] declaredFields = getClass().getDeclaredFields();
|
||||||
for (java.lang.reflect.Field field : declaredFields) {
|
for (java.lang.reflect.Field field : declaredFields) {
|
||||||
if (!java.lang.reflect.Modifier.isStatic(field.getModifiers())) continue;
|
if (!java.lang.reflect.Modifier.isStatic(field.getModifiers())) continue;
|
||||||
|
if (!field.isAccessible()) continue;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object val = field.get(null);
|
Object val = field.get(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user