Fix Sonar Issue: Change visibilty of mutable field

Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
SirWayne
2016-01-29 11:27:57 +01:00
parent d7cf777649
commit ef3618ed9e
2 changed files with 11 additions and 2 deletions

View File

@@ -210,7 +210,7 @@ public class HawkbitUI extends DefaultHawkbitUI implements DetachListener {
navigator.addView(EMPTY_VIEW, new Navigator.EmptyView()); navigator.addView(EMPTY_VIEW, new Navigator.EmptyView());
// set locale is required for I18N class also, to get the locale from // set locale is required for I18N class also, to get the locale from
// cookie // cookie
final String locale = getLocaleId(SPUIDefinitions.AVAILABLE_LOCALES); final String locale = getLocaleId(SPUIDefinitions.getAvailableLocales());
setLocale(new Locale(locale)); setLocale(new Locale(locale));
UI.getCurrent().setErrorHandler(new SPUIErrorHandler()); UI.getCurrent().setErrorHandler(new SPUIErrorHandler());

View File

@@ -26,7 +26,7 @@ public final class SPUIDefinitions {
/** /**
* Available locales. * Available locales.
*/ */
public static final Set<String> AVAILABLE_LOCALES = Stream.of("en", "de").collect(Collectors.toSet()); private static final Set<String> AVAILABLE_LOCALES = Stream.of("en", "de").collect(Collectors.toSet());
/** /**
* Default locale. * Default locale.
@@ -953,4 +953,13 @@ public final class SPUIDefinitions {
private SPUIDefinitions() { private SPUIDefinitions() {
} }
/**
* Get the locales
*
* @return the availableLocales
*/
public static Set<String> getAvailableLocales() {
return AVAILABLE_LOCALES;
}
} }