diff --git a/airsonic-main/src/main/java/org/airsonic/player/theme/CustomThemeResolver.java b/airsonic-main/src/main/java/org/airsonic/player/theme/CustomThemeResolver.java index cce487c1..9f4ebe0c 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/theme/CustomThemeResolver.java +++ b/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(); Theme[] themes = settingsService.getAvailableThemes(); + themeIds = new HashSet<>(themes.length); for (Theme theme : themes) { themeIds.add(theme.getId()); }