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!
master
jvoisin 5 years ago
parent 27c174a4d6
commit 0e8056c06a
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/theme/CustomThemeResolver.java

@ -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());
}

Loading…
Cancel
Save