From bec225ff5e9810ca70d9087bc48ccf956413246c Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Wed, 24 Mar 2021 16:30:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=89=BE=E4=B8=8D=E5=88=B0=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复打开场景找不到案例时报错的bug --- .../io/metersphere/api/service/ApiTestCaseService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index a5d9666588..c7282b0b65 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -149,10 +149,11 @@ public class ApiTestCaseService { public ApiTestCaseWithBLOBs get(String id) { // ApiTestCaseWithBLOBs returnBlobs = apiTestCaseMapper.selectByPrimaryKey(id); ApiTestCaseInfo model = extApiTestCaseMapper.selectApiCaseInfoByPrimaryKey(id); - if(StringUtils.equalsIgnoreCase(model.getApiMethod(),"esb")){ - esbApiParamService.handleApiEsbParams(model); + if(model != null ){ + if(StringUtils.equalsIgnoreCase(model.getApiMethod(),"esb")){ + esbApiParamService.handleApiEsbParams(model); + } } - return model; }