Skip to content

Commit cecbd56

Browse files
committed
Simplify option parsing
1 parent 0f3d515 commit cecbd56

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ModuleLayerFeature.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import jdk.internal.module.DefaultRoots;
5858
import jdk.internal.module.ModuleBootstrap;
5959
import jdk.internal.module.SystemModuleFinders;
60-
import org.graalvm.compiler.options.OptionValues;
6160
import org.graalvm.nativeimage.ImageSingletons;
6261

6362
import com.oracle.graal.pointsto.meta.AnalysisType;
@@ -685,9 +684,8 @@ static int distanceFromBootModuleLayer(ModuleLayer layer) {
685684
.orElse(0);
686685
}
687686

688-
public String getMainModuleName() {
689-
OptionValues parsedHostedOptions = imageClassLoader.classLoaderSupport.getParsedHostedOptions();
690-
String mainModule = SubstrateOptions.Module.getValue(parsedHostedOptions).trim();
687+
public static String getMainModuleName() {
688+
String mainModule = SubstrateOptions.Module.getValue();
691689
return mainModule.isEmpty() ? null : mainModule;
692690
}
693691

0 commit comments

Comments
 (0)