Minor refactoring in theme resolver

This should please our beloved static analysers,
and speed up by _at least_ 0.2ms the themes
selector loading time!
This commit is contained in:
jvoisin
2020-01-05 21:40:19 +01:00
parent 27c174a4d6
commit 0e8056c06a
@@ -93,8 +93,8 @@ public class CustomThemeResolver implements ThemeResolver {
private synchronized boolean themeExists(String themeId) {
// Lazily create set of theme IDs.
if (themeIds == null) {
themeIds = new HashSet<String>();
Theme[] themes = settingsService.getAvailableThemes();
themeIds = new HashSet<>(themes.length);
for (Theme theme : themes) {
themeIds.add(theme.getId());
}