summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/main
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-09-12 16:13:47 +0530
commit171ec7b74a11658277f9e9fe1dcc893a8225db9e (patch)
tree8f475fddfc39f1639ee17b77545a1fbada48ed44 /mso-api-handlers/mso-api-handler-infra/src/main
parent92ffbb4a56b1f84ed130b04ca3a9954ce610a02a (diff)
Fix for SONAR critical issues
Issue-Id : SO-117 Change-Id: Icdc64605b475e20af7e871135af327f7d0e38792 Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java6
5 files changed, 11 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java
index acdae29256..f3273cf144 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ManualTasks.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -190,7 +191,7 @@ public class ManualTasks {
completeResp = mapper.writeValueAsString(trr);
}
catch (Exception e) {
- msoLogger.debug("Unable to format response");
+ msoLogger.debug("Unable to format response",e);
Response resp = msoRequest.buildServiceErrorResponse(bpelStatus,
MsoException.ServiceException,
"Request Failed due to bad response format" ,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
index e7a2334f9c..eab232d4d5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -215,7 +216,7 @@ public class MsoRequest {
requestJSON = mapper.writeValueAsString(sir.getRequestDetails());
} catch(Exception e){
- throw new ValidationException ("Parse ServiceInstanceRequest to JSON string");
+ throw new ValidationException ("Parse ServiceInstanceRequest to JSON string",e);
}
if(instanceIdMap != null){
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
index a176f6996d..26fdba47c4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -343,7 +344,7 @@ public class OrchestrationRequests {
requestDetails = mapper.readValue(requestBody, RequestDetails.class);
}catch(Exception e){
- msoLogger.debug("Exception caught mapping requestBody to RequestDetails");
+ msoLogger.debug("Exception caught mapping requestBody to RequestDetails",e);
}
request.setRequestDetails(requestDetails);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
index a196cc0b8d..e32f1535d4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
@@ -3,6 +3,7 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -649,7 +650,7 @@ public class ServiceInstances {
msoRequest.updateFinalStatus (Status.FAILED);
msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
- msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+ msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
return resp;
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
index b191a3d767..1e8bea0c55 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/TasksHandler.java
@@ -164,7 +164,7 @@ public class TasksHandler {
msoRequest.updateFinalStatus (Status.FAILED);
msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
- msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+ msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
return resp;
}
TasksGetResponse trr = new TasksGetResponse();
@@ -206,7 +206,7 @@ public class TasksHandler {
msoLogger.error (MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.AvailabilityError, "Exception while communicate with BPMN engine");
msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine");
- msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity ());
+ msoLogger.debug ("End of the transaction, the final response is: " + (String) resp.getEntity (),e);
return resp;
}
taskList.add(taskListEntry);
@@ -235,7 +235,7 @@ public class TasksHandler {
jsonResponse = mapper.writeValueAsString(trr);
}
catch (Exception e) {
- msoLogger.debug("Unable to format response");
+ msoLogger.debug("Unable to format response",e);
Response resp = msoRequest.buildServiceErrorResponse(500,
MsoException.ServiceException,
"Request Failed due to bad response format" ,