From 3d2acbe7808b9c25816a01645dee77b5c3592bd5 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 7 Sep 2015 13:02:52 +0200 Subject: [PATCH] KEYCLOAK-1816 LocaleHelper prints info 'Locale en is not supported' --- .../java/org/keycloak/freemarker/LocaleHelper.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/LocaleHelper.java b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/LocaleHelper.java index fc249d56bf..9f1aafe4e4 100644 --- a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/LocaleHelper.java +++ b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/LocaleHelper.java @@ -18,8 +18,6 @@ public class LocaleHelper { public static final String UI_LOCALES_PARAM = "ui_locales"; public static final String KC_LOCALE_PARAM = "kc_locale"; - private final static Logger LOGGER = Logger.getLogger(LocaleHelper.class); - public static Locale getLocale(RealmModel realm, UserModel user) { return getLocale(realm, user, null, null); } @@ -38,8 +36,6 @@ public class LocaleHelper { user.setSingleAttribute(UserModel.LOCALE, locale.toLanguageTag()); } return locale; - }else{ - LOGGER.infof("Locale %s is not supported.", localeString); } } @@ -52,8 +48,6 @@ public class LocaleHelper { user.setSingleAttribute(UserModel.LOCALE, locale.toLanguageTag()); } return locale; - }else{ - LOGGER.infof("Locale %s is not supported.", localeString); } } @@ -64,8 +58,6 @@ public class LocaleHelper { if(locale != null){ return locale; - }else{ - LOGGER.infof("Locale %s is not supported.", localeString); } } @@ -75,8 +67,6 @@ public class LocaleHelper { Locale locale = findLocale(realm.getSupportedLocales(), localeString.split(" ")); if(locale != null){ return locale; - }else{ - LOGGER.infof("Locale %s is not supported.", localeString); } } @@ -87,8 +77,6 @@ public class LocaleHelper { Locale locale = findLocale(realm.getSupportedLocales(), localeString); if(locale != null){ return locale; - }else{ - LOGGER.infof("Locale %s is not supported.", localeString); } } } @@ -109,8 +97,6 @@ public class LocaleHelper { builder.cookie(new NewCookie(LocaleHelper.LOCALE_COOKIE, locale.toLanguageTag(), path, null, null, 31536000, secure)); } - - public static Locale findLocale(Set supportedLocales, String ... localeStrings) { for(String localeString : localeStrings){ Locale result = null;