From ab8858614ebdaf6e371185489ffe2d039eb9d859 Mon Sep 17 00:00:00 2001 From: weisj Date: Fri, 14 Feb 2020 10:53:24 +0100 Subject: [PATCH] Fixed NPE during icon loading. Signed-off-by: weisj --- src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java index 8f95636c..8cccc290 100644 --- a/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java @@ -30,7 +30,6 @@ import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; import java.awt.geom.AffineTransform; -import java.io.File; import java.io.Serializable; import java.net.URI; import java.util.concurrent.atomic.AtomicBoolean; @@ -90,8 +89,7 @@ public class DarkSVGIcon implements Icon, Serializable { private void ensureLoaded() { if (!loaded.get()) { - File file = new File(uri); - LOGGER.info("Loading icon '" + file.getName() + "'."); + LOGGER.info("Loading icon '" + uri.toASCIIString() + "'."); icon.setSvgURI(uri); loaded.set(true); }