aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter/src
diff options
context:
space:
mode:
authorWitold Ficio Kopel <w.kopel@samsung.com>2019-03-26 09:17:02 +0100
committerWitold Ficio Kopel <w.kopel@samsung.com>2019-03-26 13:12:09 +0100
commit59700d14ff998413dada0cb2e0864e643edbb77e (patch)
treed066adaedc28efce511d5fc66750f34e91eedb22 /adapters/mso-sdnc-adapter/src
parentaf46c0d4b30ecb5c8f36992e74adb86d7d5bbe06 (diff)
Eliminated printStackTrace() calls
Eliminated calls to printStackTrace() on Throwable as they go to stdout and are not handled by logger. Occurences has been replaced by calls to logger or modifications to nearby logger calls (Throwable passed as last parameter). Occurences in unit test classes left without modification. Change-Id: I6a771d60a3ea69ceecc29bb21358e565aa5ce101 Issue-ID: LOG-631 Signed-off-by: Witold Ficio Kopel <w.kopel@samsung.com>
Diffstat (limited to 'adapters/mso-sdnc-adapter/src')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index bea4c1bb3b..80f111b570 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -85,7 +85,7 @@ public class SDNCRestClient{
@Async
public void executeRequest(SDNCAdapterRequest bpelRequest)
{
-
+
logger.debug("BPEL Request:" + bpelRequest.toString());
// Added delay to allow completion of create request to SDNC
@@ -93,7 +93,9 @@ public class SDNCRestClient{
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
- e.printStackTrace();
+ logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "SDNC",
+ ErrorCode.UnknownError.getValue(), "Exception processing request to SDNC", e);
+
Thread.currentThread().interrupt();
}
@@ -104,12 +106,10 @@ public class SDNCRestClient{
String sdncReqBody = null;
-
-
RequestTunables rt = new RequestTunables(bpelReqId,
bpelRequest.getRequestHeader().getMsoAction(),
bpelRequest.getRequestHeader().getSvcOperation(),
- bpelRequest.getRequestHeader().getSvcAction());
+ bpelRequest.getRequestHeader().getSvcAction());
rt = tunablesMapper.setTunables(rt);
rt.setSdncaNotificationUrl(env.getProperty(Constants.MY_URL_PROP));
@@ -176,8 +176,8 @@ public class SDNCRestClient{
sdncResp.setRespCode(con.getResponseCode());
sdncResp.setRespMsg(con.getResponseMessage());
- if (con.getResponseCode()>= 200 && con.getResponseCode()<=299) {
- in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ if (con.getResponseCode()>= 200 && con.getResponseCode()<=299) {
+ in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
//Not parsing the response -it contains a responseHdr section and data section
while ((inputLine = in.readLine()) != null) {
@@ -185,7 +185,7 @@ public class SDNCRestClient{
}
in.close();
}
-
+
sdncResp.setSdncRespXml(response.toString());
logger.info("{} :\n {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.name(), sdncResp.toString(), "SDNC");
return(sdncResp);
@@ -314,7 +314,7 @@ public class SDNCRestClient{
SDNCCallbackAdapterPortType cbPort = cbSvc.getSDNCCallbackAdapterSoapHttpPort();
BindingProvider bp = (BindingProvider)cbPort;
-
+
if(null != wsdlUrl) {
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, wsdlUrl.toExternalForm());
}