Skip to content

Commit f4840f5

Browse files
Add null check for responseRef
1 parent 2fad596 commit f4840f5

File tree

2 files changed

+4
-6
lines changed
  • dss-appconn/appconns/dss-sparketl-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/sparketl
  • dss-standard/development-standard/development-process-standard/src/main/java/com/webank/wedatasphere/dss/standard/app/development/utils

2 files changed

+4
-6
lines changed

dss-appconn/appconns/dss-sparketl-appconn/src/main/java/com/webank/wedatasphere/dss/appconn/sparketl/SparkEtlAppConn.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
public class SparkEtlAppConn extends AbstractAppConn implements OnlyDevelopmentAppConn {
1111

12-
public static final String SPARKETL_APPCONN_NAME = CommonVars.apply("wds.dss.appconn.sparketl.name", "sparketl").getValue();
13-
1412
private SparkEtlDevelopmentStandard developmentStandard;
1513

1614
@Override
@@ -23,7 +21,4 @@ public DevelopmentIntegrationStandard getOrCreateDevelopmentStandard() {
2321
return developmentStandard;
2422
}
2523

26-
27-
28-
2924
}

dss-standard/development-standard/development-process-standard/src/main/java/com/webank/wedatasphere/dss/standard/app/development/utils/DevelopmentOperationUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ public static <K extends DevelopmentRequestRef, V extends ResponseRef> V tryDeve
9191
String error = String.format("%s failed. Caused by: %s.", errorMsg, ExceptionUtils.getRootCauseMessage(e));
9292
throw new ExternalOperationFailedException(50010, error, e);
9393
}
94-
if(responseRef.isFailed()) {
94+
if(responseRef == null) {
95+
LOGGER.error("{} failed. Caused by: empty responseRef returned by AppConn.", errorMsg);
96+
throw new ExternalOperationFailedException(61123, errorMsg + " failed. Caused by: empty responseRef returned by AppConn.");
97+
} else if(responseRef.isFailed()) {
9598
LOGGER.error("{} failed. Caused by: {}.", errorMsg, responseRef.getErrorMsg());
9699
DSSExceptionUtils.dealWarnException(61123,
97100
String.format("%s failed. Caused by: %s.", errorMsg, responseRef.getErrorMsg()),

0 commit comments

Comments
 (0)