Added logger statements 44/81944/4
authorJegadeesh Babu <jegabab1@in.ibm.com>
Mon, 11 Mar 2019 14:12:26 +0000 (19:42 +0530)
committerTakamune Cho <takamune.cho@att.com>
Tue, 12 Mar 2019 19:04:04 +0000 (19:04 +0000)
Sonar fix

Issue-ID: APPC-1529
Change-Id: Ibb3dd50ad85232f7c5474c075045523aac531899
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
appc-core/appc-common-bundle/src/main/java/org/onap/appc/util/StreamHelper.java

index 4468c84..dd6d7f5 100644 (file)
@@ -6,6 +6,8 @@
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
+ * Modifications Copyright (C) 2019 IBM
+ * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -28,7 +30,11 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.Charset;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class StreamHelper {
+  private static final Logger log = LoggerFactory.getLogger(StreamHelper.class);
 
     /**
      * private default constructor prevents instantiation
@@ -52,7 +58,7 @@ public class StreamHelper {
                     len = inputStream.read(array);
                 }
             } catch (IOException e) {
-                e.printStackTrace();
+                log.error("Error occured while reading from Stream", e);
             }
         }