diff --git a/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/.ratings b/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/.ratings index d8aad1a695ee70a33a9224b9196e6a220822fcaf..b16c7a6de792959233d53195bc2eced75eb11241 100644 --- a/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/.ratings +++ b/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/.ratings @@ -1,2 +1,2 @@ -GraphicUtils.java 46cfc991cd3ef787fec3f95751bc680d68479e26 GREEN +GraphicUtils.java 9373a2c7a5ebb0d87284d0f6f983348812e5b90d YELLOW JavaFXUtils.java db3cf28289109ffec64c8f96c7b2de779a977b3b GREEN diff --git a/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/GraphicUtils.java b/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/GraphicUtils.java index 46cfc991cd3ef787fec3f95751bc680d68479e26..9373a2c7a5ebb0d87284d0f6f983348812e5b90d 100644 --- a/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/GraphicUtils.java +++ b/org.fortiss.tooling.common.ui/src/org/fortiss/tooling/common/ui/javafx/util/GraphicUtils.java @@ -32,7 +32,7 @@ public class GraphicUtils { private static final HashMap<String, Image> imageCache = new HashMap<>(); /** Returns the plugin-local URI string for the given resource. */ - public static String getURIString(String pluginId, String localPath) { + private static String getURIString(String pluginId, String localPath) { if(!pluginId.endsWith("/") && !localPath.startsWith("/")) { localPath = "/" + localPath; } @@ -41,6 +41,9 @@ public class GraphicUtils { /** Returns the Java FX Image loaded from the plugin's local path. */ public static Image getFXImage(String pluginId, String localPath) { + if(pluginId == null || localPath == null) { + return null; + } String uri = getURIString(pluginId, localPath); if(uri == null) { return null;