From a6f126bcc7bd17ffecf99045e8124e5e0f9d4fbc Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sat, 16 Mar 2019 00:48:14 +0100 Subject: [PATCH] Fix IllegalAccessException while initializing an ORM class --- src/main/java/fr/pandacube/java/util/orm/SQLElement.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/fr/pandacube/java/util/orm/SQLElement.java b/src/main/java/fr/pandacube/java/util/orm/SQLElement.java index c857212..02f368b 100644 --- a/src/main/java/fr/pandacube/java/util/orm/SQLElement.java +++ b/src/main/java/fr/pandacube/java/util/orm/SQLElement.java @@ -98,6 +98,7 @@ public abstract class SQLElement> { 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);