From 8eec120925afadc3200340e0a86dc18984ef23c5 Mon Sep 17 00:00:00 2001 From: lucian Date: Tue, 22 Dec 2020 17:28:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-43744=20=E3=80=9010.0.13=E3=80=91?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=B8=8Ejar=E5=8C=85=E4=B8=8D=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E9=97=AE=E9=A2=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginOperateUtils.java | 2 +- .../test/java/com/fr/design/extra/PluginOperateUtilsTest.java | 2 +- 2 files changed, 2 insertions(+), 2 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 46683e0a05..499254aeb7 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 @@ -231,7 +231,7 @@ public class PluginOperateUtils { else if (pluginMarker instanceof PluginMarkerAdapter) { return ((PluginMarkerAdapter) pluginMarker).getPluginName(); } - return pluginMarker == null ? null : pluginMarker.getPluginID(); + return pluginMarker == null ? StringUtils.EMPTY : pluginMarker.getPluginID(); } public static String getSwitchedInfo(PluginTaskResult result) { diff --git a/designer-base/src/test/java/com/fr/design/extra/PluginOperateUtilsTest.java b/designer-base/src/test/java/com/fr/design/extra/PluginOperateUtilsTest.java index 887cde43e0..bc81cb2c36 100644 --- a/designer-base/src/test/java/com/fr/design/extra/PluginOperateUtilsTest.java +++ b/designer-base/src/test/java/com/fr/design/extra/PluginOperateUtilsTest.java @@ -92,7 +92,7 @@ public class PluginOperateUtilsTest { EasyMock.replay(pluginContext); - Assert.assertNull(Reflect.on(PluginOperateUtils.class).call("getPluginName", null, null).get()); + Assert.assertEquals(Reflect.on(PluginOperateUtils.class).call("getPluginName", null, null).get(), ""); Assert.assertEquals(Reflect.on(PluginOperateUtils.class).call("getPluginName", pluginContext, pluginMarker1).get(), "pluginContext"); Assert.assertEquals(Reflect.on(PluginOperateUtils.class).call("getPluginName", null, pluginMarker1).get(), "id-1"); Assert.assertEquals(Reflect.on(PluginOperateUtils.class).call("getPluginName", null, pluginMarker2).get(), "name-2");