[keycloak-dev] loading keycloak-server.json

Stian Thorgersen stian at redhat.com
Fri Sep 26 02:37:58 EDT 2014


Adding param is fine, but make the method protected so anyone that extends KeycloakApplication can access it.

----- Original Message -----
> From: "Stan Silvert" <ssilvert at redhat.com>
> To: keycloak-dev at lists.jboss.org
> Sent: Thursday, 25 September, 2014 9:42:35 PM
> Subject: [keycloak-dev] loading keycloak-server.json
> 
> Anyone have a problem with adding a param to this loadConfig() method?
> https://github.com/keycloak/keycloak/blob/master/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java#L106
> 
> If keycloak-server.json is loaded from the Keycloak subsystem then it
> will come in through the ServletContext as a String.  So I want to pass
> in the ServletContext.
> 
> The reason I ask is because this is a public method.  It looks like it
> is only public because a test tool wants to call it.
> https://github.com/keycloak/keycloak/blob/master/testsuite/tools/src/main/java/org/keycloak/test/tools/KeycloakTestApplication.java#L25
> 
> Would anyone in the real world ever call loadConfig()?  Should it really
> be public?
> 
> I can change the method to package private and change the package of the
> test tool to match.  That's the way I've always handled it when a test
> class absolutely must call a non-public method.
> 
> Comments?
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list