From 5e62be6ff02e35176178c66cdbb2ea0afa88901c Mon Sep 17 00:00:00 2001 From: Jegadeesh Babu Date: Mon, 11 Mar 2019 19:42:26 +0530 Subject: Added logger statements Sonar fix Issue-ID: APPC-1529 Change-Id: Ibb3dd50ad85232f7c5474c075045523aac531899 Signed-off-by: Jegadeesh Babu --- .../src/main/java/org/onap/appc/util/StreamHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'appc-core/appc-common-bundle/src') diff --git a/appc-core/appc-common-bundle/src/main/java/org/onap/appc/util/StreamHelper.java b/appc-core/appc-common-bundle/src/main/java/org/onap/appc/util/StreamHelper.java index 4468c841b..dd6d7f5c9 100644 --- a/appc-core/appc-common-bundle/src/main/java/org/onap/appc/util/StreamHelper.java +++ b/appc-core/appc-common-bundle/src/main/java/org/onap/appc/util/StreamHelper.java @@ -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); } } -- cgit 1.2.3-korg