summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-05-10 15:26:22 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-05-10 15:51:29 +0800
commit3e6e4249d8815e76a776615f5ca41a79a3f74a8e (patch)
treef59c928c53be488c6d28be51413807792826c3c2
parentb3963d8b0901db1cde5ea85f58684e89b76bf0cc (diff)
Fix bugs reported by sonar
Use new variable in convertJsonToCloudOrchestrationRequest, fix bug reported by sonar. Change-Id: I3f95bd410d950d4661584c1510a66ce90d6785d5 Issue-ID: SO-580 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestration.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestration.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestration.java
index 4801811c41..ecbe97c637 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestration.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestration.java
@@ -281,10 +281,11 @@ public class CloudOrchestration {
private CloudOrchestrationRequest convertJsonToCloudOrchestrationRequest(String requestJSON, Action action, long startTime,
CloudOrchestrationRequest cor) throws Exception {
+ CloudOrchestrationRequest new_cor = null;
try{
msoLogger.debug("Converting incoming JSON request to Object");
ObjectMapper mapper = new ObjectMapper();
- cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
+ new_cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
} catch(Exception e){
msoLogger.debug ("Mapping of request to JSON object failed : ", e);
if (getTenantIsolationRequest().getRequestId () != null) {
@@ -295,7 +296,7 @@ public class CloudOrchestration {
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.SchemaError, "Mapping of request to JSON object failed");
throw new Exception(e);
}
- return cor;
+ return new_cor;
}
public TenantIsolationRequest getTenantIsolationRequest() {