Merge pull request #16 from bsinno/Sonar_Fix_protected_member

+1, merged
Sonar fix protected member
This commit is contained in:
Michael Hirsch
2016-02-02 10:45:51 +01:00
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());
// set locale is required for I18N class also, to get the locale from
// cookie
final String locale = getLocaleId(SPUIDefinitions.AVAILABLE_LOCALES);
final String locale = getLocaleId(SPUIDefinitions.getAvailableLocales());
setLocale(new Locale(locale));
UI.getCurrent().setErrorHandler(new SPUIErrorHandler());

View File

@@ -26,7 +26,7 @@ public final class SPUIDefinitions {
/**
* 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.
@@ -953,4 +953,13 @@ public final class SPUIDefinitions {
private SPUIDefinitions() {
}
/**
* Get the locales
*
* @return the availableLocales
*/
public static Set<String> getAvailableLocales() {
return AVAILABLE_LOCALES;
}
}