diff --git a/property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java b/property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java index acfa3f69..a62332b9 100644 --- a/property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java +++ b/property-loader/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java @@ -176,6 +176,7 @@ public final class IconColorMapper { } private static float getOpacity(final String key, final String[] fallbacks, final Map propertyMap) { + if ((key == null || key.isEmpty()) && (fallbacks == null || fallbacks.length == 0)) return -1; // UIManager defaults to 0, if the value isn't an integer (or null). Number obj = get(propertyMap, key, fallbacks, Number.class); if (obj instanceof Integer) { @@ -187,9 +188,7 @@ public final class IconColorMapper { } else if (obj instanceof Double) { return obj.floatValue(); } - if (key != null && !key.isEmpty()) { - LOGGER.warning(obj + " is an invalid opacity value. Key = '" + key + "'"); - } + LOGGER.warning(obj + " is an invalid opacity value. Key = '" + key + "'"); // In this case we default to -1. return -1; }