diff options
author | 2016-09-06 11:16:07 +0800 | |
---|---|---|
committer | 2016-09-06 11:16:07 +0800 | |
commit | 663812633300ea2b64e159137248a140965bf31b (patch) | |
tree | 96e3b4d5f2718c69679fce1b1166c795d203c55a /catalog-core/catalog-mgr | |
parent | fdd9882d31ca618a2e1e1e8dc3f09c11b2097642 (diff) |
Protected for Response Null While Deploy Plan-Package to wso2
Change-Id: I4c84d3bb9f94f01e21e605791019e62a78618e13
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'catalog-core/catalog-mgr')
-rw-r--r-- | catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java index da52dcd7..48b866e0 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java @@ -66,6 +66,11 @@ public class Wso2ServiceConsumer { Integer.parseInt(Config.getConfigration().getWso2HostPort()), WSO2_APP_URL,
buildRequest(ins, planFilePath));
+ if (res.getStatusCode() == null || res.getResult() == null) {
+ throw new CatalogResourceException(
+ "Deploy Package return null. Response = " + res);
+ }
+
if (200 == res.getStatusCode() || 201 == res.getStatusCode()) {
DeployPackageResponse response =
new Gson().fromJson(res.getResult(), DeployPackageResponse.class);
@@ -182,4 +187,3 @@ public class Wso2ServiceConsumer { }
}
-
|