Fix IllegalAccessException while initializing an ORM class

This commit is contained in:
Marc Baloup 2019-03-16 00:48:14 +01:00
parent d853368f4c
commit a6f126bcc7
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ public abstract class SQLElement<E extends SQLElement<E>> {
java.lang.reflect.Field[] declaredFields = getClass().getDeclaredFields();
for (java.lang.reflect.Field field : declaredFields) {
if (!java.lang.reflect.Modifier.isStatic(field.getModifiers())) continue;
if (!field.isAccessible()) continue;
try {
Object val = field.get(null);