Skip to content

Commit

Permalink
Fix DEV UI startup when OIDC Dev UI is disabled
Browse files Browse the repository at this point in the history
(cherry picked from commit 491dc36)
  • Loading branch information
michalvavrik authored and gsmet committed Dec 12, 2023
1 parent eef1eda commit 8d5a34f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ public OidcDevJsonRpcService(HttpConfiguration httpConfiguration, SmallRyeConfig
// we must always produce it when in DEV mode because we can't check for 'KeycloakDevServicesConfigBuildItem'
// due to circular reference: JSON RPC provider is additional bean and 'LoggingSetupBuildItem' used by
// 'KeycloakDevServicesProcessor' is created with combined index
OidcDevUiRpcSvcPropertiesBean props = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class).get();
final var propsInstanceHandle = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class);
final OidcDevUiRpcSvcPropertiesBean props;
if (propsInstanceHandle.isAvailable()) {
props = propsInstanceHandle.get();
} else {
// OIDC Dev UI is disabled, but this RPC service still gets initialized by Quarkus DEV UI
props = new OidcDevUiRpcSvcPropertiesBean(null, null, null, null, Map.of(), Map.of(), null, null, null, false, null,
List.of(), false, false, null, null, false);
}

this.httpPort = httpConfiguration.port;
this.config = config;
Expand Down

0 comments on commit 8d5a34f

Please sign in to comment.