Fixes in JsonResponseHandler 07/29307/2
authorburdziak <olaf.burdziakowski@nokia.com>
Fri, 26 Jan 2018 10:32:31 +0000 (11:32 +0100)
committerPatrick Brady <pb071s@att.com>
Fri, 26 Jan 2018 16:39:51 +0000 (16:39 +0000)
Change-Id: I4bafbf7083007608d3be6ec0ea4883338752a157
Issue-ID: APPC-537
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
appc-client/client-simulator/src/main/java/org/onap/appc/simulator/client/impl/JsonResponseHandler.java

index c19abb2..00b22db 100644 (file)
@@ -58,7 +58,7 @@ public class JsonResponseHandler implements ResponseHandler<Object> {
         try {
             output = OBJECT_MAPPER.writeValueAsString(response);
         } catch (JsonProcessingException e) {
-            e.printStackTrace();
+            LOG.error(e.getMessage());
         }
         LOG.debug("Received response : " + output);
 
@@ -86,7 +86,6 @@ public class JsonResponseHandler implements ResponseHandler<Object> {
             }
 
         } catch (Exception e) {
-            e.printStackTrace();
             throw new RuntimeException(e);
         }
 
@@ -140,7 +139,7 @@ public class JsonResponseHandler implements ResponseHandler<Object> {
                 fileWriter.close();
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            LOG.error(e.getMessage());
         }
         System.out.println("== THR#" +Thread.currentThread().getId()+ " Output file : " + fileName + suffix);
     }