diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaConstructor.java b/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaConstructor.java index 48b05808d5..7b8672fc68 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaConstructor.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaConstructor.java @@ -14,7 +14,7 @@ final class DtoMetaConstructor { private final Class[] types; private final MethodHandle handle; - private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); + private static final MethodHandles.Lookup LOOKUP = MethodHandles.publicLookup(); private final ScalarType[] scalarTypes; DtoMetaConstructor(TypeManager typeManager, Constructor constructor, Class someClass) throws NoSuchMethodException, IllegalAccessException { diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaProperty.java b/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaProperty.java index 680c0095b6..f0efe9b02d 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaProperty.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/dto/DtoMetaProperty.java @@ -13,7 +13,7 @@ final class DtoMetaProperty implements DtoReadSet { - private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); + private static final MethodHandles.Lookup LOOKUP = MethodHandles.publicLookup(); private final Class dtoType; private final String name;