aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/loop/LoopOperation.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/loop/LoopOperation.java b/src/main/java/org/onap/clamp/loop/LoopOperation.java
index 172b77c2..87effa5f 100644
--- a/src/main/java/org/onap/clamp/loop/LoopOperation.java
+++ b/src/main/java/org/onap/clamp/loop/LoopOperation.java
@@ -144,12 +144,13 @@ public class LoopOperation {
JSONObject linksObj = (JSONObject) jsonObj.get(DCAE_LINK_FIELD);
String statusUrl = (String) linksObj.get(DCAE_STATUS_FIELD);
- // use http4 instead of http, because camel http4 component is used to do the
- // http call
- String newStatusUrl = statusUrl.replaceAll("http:", "http4:").replaceAll("https:", "https4:");
-
- loop.setDcaeDeploymentId(deploymentId);
- loop.setDcaeDeploymentStatusUrl(newStatusUrl);
+ if (deploymentId == null) {
+ loop.setDcaeDeploymentId(null);
+ loop.setDcaeDeploymentStatusUrl(null);
+ } else {
+ loop.setDcaeDeploymentId(deploymentId);
+ loop.setDcaeDeploymentStatusUrl(statusUrl.replaceAll("http:", "http4:").replaceAll("https:", "https4:"));
+ }
loopService.saveOrUpdateLoop(loop);
}