aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra
diff options
context:
space:
mode:
authorchuanyu chen <chenchuanyu@huawei.com>2017-09-13 10:06:06 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-13 10:06:06 +0000
commit52c9a4043334cae64e127da7900e00f78191c71b (patch)
treeab3fa353c095ace440f9a91aff0f154d0d03633e /mso-api-handlers/mso-api-handler-infra
parent7df197114475c485d32facc96cf602b3f1d0e4c1 (diff)
parent171ec7b74a11658277f9e9fe1dcc893a8225db9e (diff)
Merge "Fix for SONAR critical issues Issue-Id : SO-117"
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra')
-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" ,