diff --git a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java index 680e2ddebc..deca059a99 100644 --- a/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java +++ b/designer-base/src/main/java/com/fr/base/svg/SVGIcon.java @@ -7,8 +7,8 @@ import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * SVG转化而来的Icon @@ -30,7 +30,7 @@ public class SVGIcon implements Icon { this.image = image; } - private static Map iconCache = new HashMap<>(); + private static Map iconCache = new ConcurrentHashMap<>(); @Override public void paintIcon(Component c, Graphics g, int x, int y) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 60cd13ee65..caeb32f49f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -82,8 +82,10 @@ import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.undo.UndoManager; -import java.util.*; -import java.util.regex.Pattern; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; import java.awt.BorderLayout; /**