Bugfix: Can not read keycloak-server.json if the path contains a space

https://issues.jboss.org/browse/KEYCLOAK-892
This commit is contained in:
gerbermichi 2014-12-16 18:54:48 +01:00
parent 1650cb33c6
commit 0755cb6996

View file

@ -110,15 +110,15 @@ public class KeycloakApplication extends Application {
if (configDir != null) {
File f = new File(configDir + File.separator + "keycloak-server.json");
if (f.isFile()) {
log.info("Load config from " + f.getAbsolutePath());
node = new ObjectMapper().readTree(f);
log.info("Loaded config from " + f.getAbsolutePath());
}
}
if (node == null) {
URL resource = Thread.currentThread().getContextClassLoader().getResource("META-INF/keycloak-server.json");
log.info("Load config from " + resource);
node = new ObjectMapper().readTree(resource);
log.info("Loaded config from " + resource);
}
if (node != null) {