From ab96114ef86aa31ef6cf1f1fb2230a52ce8c83a8 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 24 Feb 2016 06:59:02 +0100 Subject: [PATCH] KEYCLOAK-2539 Migration fails if DisplayNameHtml is null for master realm --- .../java/org/keycloak/migration/migrators/MigrateTo1_9_0.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_0.java b/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_0.java index 81414c1bea..f8c709b471 100644 --- a/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_0.java +++ b/server-spi/src/main/java/org/keycloak/migration/migrators/MigrateTo1_9_0.java @@ -39,7 +39,7 @@ public class MigrateTo1_9_0 { public void migrate(KeycloakSession session) { RealmModel realm = session.realms().getRealmByName(Config.getAdminRealm()); - if (realm != null && realm.getDisplayNameHtml().equals("Keycloak")) { + if (realm != null && realm.getDisplayNameHtml() != null && realm.getDisplayNameHtml().equals("Keycloak")) { realm.setDisplayNameHtml("
Keycloak
"); } }