From f462925487d4fbb7a3914b90fb3f9edac3c9976c Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 16 Mar 2021 10:42:02 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-48965=20=E5=87=BA=E7=8E=B0concurrentModi?= =?UTF-8?q?fication=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/actions/core/ActionFactory.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java index 574195470..6c7d6408a 100644 --- a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java +++ b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java @@ -14,11 +14,12 @@ import java.awt.event.KeyEvent; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Collections; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.CopyOnWriteArraySet; /** * 插入单元格元素和插入悬浮元素的一些集合方法 @@ -27,8 +28,8 @@ import java.util.concurrent.ConcurrentMap; * @version 2017年11月17日14点39分 */ public class ActionFactory { - private static LinkedHashSet> actionClasses = new LinkedHashSet<>(); - private static LinkedHashSet> floatActionClasses = new LinkedHashSet<>(); + private static Set> actionClasses = new CopyOnWriteArraySet<>(); + private static Set> floatActionClasses = new CopyOnWriteArraySet<>(); private static Class chartCollectionClass = null; /** * 无需每次实例化的悬浮元素编辑器