Skip to content

Commit

Permalink
Ensure LibGraalFeature is allowed to instantiate OptionDescriptor sub…
Browse files Browse the repository at this point in the history
…classes
  • Loading branch information
olpaw committed May 5, 2022
1 parent 8505eef commit fdd8459
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public void duringSetup(DuringSetupAccess access) {
for (Class<? extends OptionDescriptors> 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);
Expand Down

0 comments on commit fdd8459

Please sign in to comment.