From 9cde4b21052368e1f21ce0b7d80657e0f5339358 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 15 Dec 2023 15:02:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-99485=20fix:=E7=81=B0=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=97=A0=E6=B3=95=E8=B7=9F=E9=9A=8FDPI=E5=8F=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fine/theme/icon/IconManager.java | 5 +++-- .../main/java/com/fine/theme/icon/UrlIconResource.java | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fine/theme/icon/IconManager.java b/designer-base/src/main/java/com/fine/theme/icon/IconManager.java index 3f9f6c7f76..7800b4c1f9 100644 --- a/designer-base/src/main/java/com/fine/theme/icon/IconManager.java +++ b/designer-base/src/main/java/com/fine/theme/icon/IconManager.java @@ -25,9 +25,7 @@ public class IconManager { public static boolean initialized = false; public static ArrayList iconSets = new ArrayList<>(2); - ; public static HashMap> cache = new HashMap<>(60); - ; public static HashMap> disableCache = new HashMap<>(60); @@ -130,6 +128,7 @@ public class IconManager { */ public static void clearCache() { cache.clear(); + disableCache.clear(); } /** @@ -137,11 +136,13 @@ public class IconManager { */ public static void clearIconCache(String id) { cache.remove(id); + disableCache.remove(id); } private static void clearIconSetCache(@NotNull IconSet set) { for (String id : set.getIds()) { cache.remove(id); + disableCache.remove(id); } } } diff --git a/designer-base/src/main/java/com/fine/theme/icon/UrlIconResource.java b/designer-base/src/main/java/com/fine/theme/icon/UrlIconResource.java index 1684a5464c..61746e3bf5 100644 --- a/designer-base/src/main/java/com/fine/theme/icon/UrlIconResource.java +++ b/designer-base/src/main/java/com/fine/theme/icon/UrlIconResource.java @@ -6,6 +6,7 @@ import com.fr.third.errorprone.annotations.Immutable; import org.jetbrains.annotations.NotNull; import java.io.InputStream; +import java.util.StringJoiner; /** * url图标资源 @@ -42,4 +43,11 @@ public class UrlIconResource implements IconResource { InputStream inputStream = IOUtils.getInputStream(path); return inputStream != null ? inputStream : ResourceIOUtils.read(path); } + + @Override + public String toString() { + return new StringJoiner(", ", UrlIconResource.class.getSimpleName() + "[", "]") + .add("path='" + path + "'") + .toString(); + } }