diff --git a/source/net/filebot/ResourceManager.java b/source/net/filebot/ResourceManager.java index c6a68788..2d17ad3f 100644 --- a/source/net/filebot/ResourceManager.java +++ b/source/net/filebot/ResourceManager.java @@ -1,6 +1,5 @@ package net.filebot; -import static java.util.Arrays.*; import static java.util.Collections.*; import static java.util.stream.Collectors.*; @@ -22,24 +21,16 @@ public final class ResourceManager { private static final Map cache = synchronizedMap(new HashMap(256)); - public static Icon getIcon(String... name) { - return getIcon(asList(name)); - } - - private static Icon getIcon(List icons) { - if (icons.isEmpty()) { - return null; - } - - return cache.computeIfAbsent(icons.get(0), i -> { + public static Icon getIcon(String name) { + return cache.computeIfAbsent(name, i -> { // load image URL[] resource = getMultiResolutionImageResource(i); if (resource.length > 0) { return new ImageIcon(getMultiResolutionImage(resource)); } - // try next image - return getIcon(icons.subList(1, icons.size())); + // default image + return null; }); }