From fdd84596c13ae2825aa1ba9b7e0ec70de059b563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20W=C3=B6gerer?= Date: Thu, 5 May 2022 16:07:56 +0200 Subject: [PATCH] Ensure LibGraalFeature is allowed to instantiate OptionDescriptor subclasses --- .../com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java | 1 + 1 file changed, 1 insertion(+) diff --git a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java index 06e291a3b5d0..2804b60eaf95 100644 --- a/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java +++ b/substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java @@ -221,6 +221,7 @@ public void duringSetup(DuringSetupAccess access) { for (Class optionsClass : imageClassLoader.findSubclasses(OptionDescriptors.class, false)) { if (!Modifier.isAbstract(optionsClass.getModifiers()) && !OptionDescriptorsMap.class.isAssignableFrom(optionsClass)) { try { + ModuleSupport.accessModuleByClass(ModuleSupport.Access.EXPORT, LibGraalFeature.class, optionsClass); for (OptionDescriptor d : optionsClass.getDeclaredConstructor().newInstance()) { if (!(d.getOptionKey() instanceof HostedOptionKey)) { descriptors.put(d.getName(), d);