From c72da02f57af4166037580f9bc47e15745364a45 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 7 Jun 2023 09:50:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-89867=20=E3=80=90=E9=99=8D=E6=9C=AC?= =?UTF-8?q?=E5=A2=9E=E6=95=88=E3=80=91=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=8E=BB=E9=99=A4=E4=B8=A4=E6=AC=A1for?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/PluginOperateUtils.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java index a5aa14a300..8baccba847 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java @@ -123,14 +123,10 @@ public class PluginOperateUtils { @Override public void run() { - List pluginInfos = new ArrayList<>(); - for (int i = 0, len = pluginIDs.length(); i < len; i++) { + int len = pluginIDs.length(); + BatchModifyStatusCallback modifyStatusCallback = new BatchModifyStatusCallback(jsCallback, len); + for (int i = 0; i < len; i++) { String pluginInfo = pluginIDs.get(i).asString().getValue(); - pluginInfos.add(pluginInfo); - - } - BatchModifyStatusCallback modifyStatusCallback = new BatchModifyStatusCallback(jsCallback, pluginIDs.length()); - for (String pluginInfo : pluginInfos) { PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); dealWithPluginActive(pluginMarker, modifyStatusCallback); } @@ -313,8 +309,7 @@ public class PluginOperateUtils { private static String getPluginName(PluginContext pluginContext, PluginMarker pluginMarker) { if (pluginContext != null) { return pluginContext.getName(); - } - else if (pluginMarker instanceof PluginMarkerAdapter) { + } else if (pluginMarker instanceof PluginMarkerAdapter) { return ((PluginMarkerAdapter) pluginMarker).getPluginName(); } return pluginMarker == null ? StringUtils.EMPTY : pluginMarker.getPluginID();