diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java index de47b02e926029..d181e33c5a1f74 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java @@ -268,8 +268,6 @@ void build(List staticInitTasks, startupContext, mv.getMethodParam(0)); mv.invokeStaticMethod(CONFIGURE_STEP_TIME_ENABLED); - ResultHandle profiles = mv - .invokeStaticMethod(ofMethod(ConfigUtils.class, "getProfiles", List.class)); tryBlock = mv.tryBlock(); tryBlock.invokeStaticMethod(CONFIGURE_STEP_TIME_START); @@ -298,7 +296,7 @@ void build(List staticInitTasks, tryBlock.load(applicationInfo.getVersion()), tryBlock.load(Version.getVersion()), featuresHandle, - profiles, + tryBlock.invokeStaticMethod(ofMethod(ConfigUtils.class, "getProfiles", List.class)), tryBlock.load(LaunchMode.DEVELOPMENT.equals(launchMode.getLaunchMode())), tryBlock.load(launchMode.isAuxiliaryApplication()));