diff options
author | Dmitry Puzikov <d.puzikov2@partner.samsung.com> | 2019-11-19 14:41:01 +0100 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-11-21 15:37:13 +0000 |
commit | 150477bbad4ce5d0abca9af4d36118ab201b39bd (patch) | |
tree | 076b25d867250c8335f98d18e6969ab0f63d028a /common/onap-common-configuration-management | |
parent | 30510151ca3575cb079aba0ea34567add7c52526 (diff) |
Fixing sonar issues
Logging exception instead of printing trace.
Change-Id: I6c24c258fc1b96c74e55aa2f90c82d09f28ef247
Issue-ID: SDC-2660
Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'common/onap-common-configuration-management')
-rw-r--r-- | common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/NonConfigResource.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/NonConfigResource.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/NonConfigResource.java index 065e7f42b4..5e21fbdfb9 100644 --- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/NonConfigResource.java +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/NonConfigResource.java @@ -16,6 +16,9 @@ package org.onap.config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.File; import java.net.MalformedURLException; import java.net.URI; @@ -32,6 +35,7 @@ import java.util.Set; import java.util.function.Function; public class NonConfigResource { + private static final Logger LOGGER = LoggerFactory.getLogger(NonConfigResource.class); static final String NODE_CONFIG_LOCATION = "node.config.location"; static final String CONFIG_LOCATION = "config.location"; @@ -74,7 +78,7 @@ public class NonConfigResource { .findFirst().orElse(null); } catch (Exception exception) { - exception.printStackTrace(); + LOGGER.error("Failed to locate resource '{}'.", resource, exception); return null; } } |