From fa9aec151f4680dd2964b5c2c4ee8d75df2b198b Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 22 Sep 2020 14:19:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?style(XPack):=20=E4=BB=A3=E7=A0=81=E5=86=99?= =?UTF-8?q?=E6=B3=95=E8=A7=84=E8=8C=83=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/service/LicenseService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/service/LicenseService.java b/backend/src/main/java/io/metersphere/service/LicenseService.java index 8636d4ae0e..25e46b3d18 100644 --- a/backend/src/main/java/io/metersphere/service/LicenseService.java +++ b/backend/src/main/java/io/metersphere/service/LicenseService.java @@ -5,6 +5,6 @@ import io.metersphere.dto.LicenseDTO; public interface LicenseService { public LicenseDTO valid(); - + public LicenseDTO addValidLicense(String reqLicenseCode); } From c46b8dccb6b1e954422872437e5888a55c190e9f Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 22 Sep 2020 14:33:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?style(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?= =?UTF-8?q?:=20=E7=BB=9F=E4=B8=80util=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/xmind/XmindCaseParser.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java b/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java index eef17be4a7..99441d8e72 100644 --- a/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java +++ b/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java @@ -12,7 +12,7 @@ import io.metersphere.track.service.TestCaseService; import io.metersphere.xmind.parser.XmindParser; import io.metersphere.xmind.parser.pojo.Attached; import io.metersphere.xmind.parser.pojo.JsonRootBean; -import org.springframework.util.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.web.multipart.MultipartFile; import java.util.*; @@ -21,7 +21,7 @@ import java.util.regex.Pattern; /** * 数据转换 - * 1 解析Xmind文件 XmindParser.parseJson + * 1 解析Xmind文件 XmindParser.parseObject * 2 解析后的JSON this.parse 转成测试用例 */ public class XmindCaseParser { @@ -33,10 +33,10 @@ public class XmindCaseParser { // 已存在用例名称 private Set testCaseNames; - // 案例详情重写了hashCode方法去重用 + // 转换后的案例信息 private List testCases; - // 用于重复对比 + // 案例详情重写了hashCode方法去重用 private List compartDatas; public XmindCaseParser(TestCaseService testCaseService, String userId, String projectId, Set testCaseNames) { @@ -194,21 +194,21 @@ public class XmindCaseParser { String nodePath = data.getNodePath(); StringBuilder stringBuilder = new StringBuilder(); - if (nodePath != null) { + if (!StringUtils.isEmpty(nodePath)) { String[] nodes = nodePath.split("/"); if (nodes.length > TestCaseConstants.MAX_NODE_DEPTH + 1) { stringBuilder.append(Translator.get("test_case_node_level_tip") + TestCaseConstants.MAX_NODE_DEPTH + Translator.get("test_case_node_level") + "; "); } for (int i = 0; i < nodes.length; i++) { - if (i != 0 && org.apache.commons.lang3.StringUtils.equals(nodes[i].trim(), "")) { + if (i != 0 && StringUtils.equals(nodes[i].trim(), "")) { stringBuilder.append(Translator.get("module_not_null") + "; "); break; } } } - if (org.apache.commons.lang3.StringUtils.equals(data.getType(), TestCaseConstants.Type.Functional.getValue()) && org.apache.commons.lang3.StringUtils.equals(data.getMethod(), TestCaseConstants.Method.Auto.getValue())) { + if (StringUtils.equals(data.getType(), TestCaseConstants.Type.Functional.getValue()) && StringUtils.equals(data.getMethod(), TestCaseConstants.Method.Auto.getValue())) { stringBuilder.append(Translator.get("functional_method_tip") + "; "); }