summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-adaptor/provider/src/main
diff options
context:
space:
mode:
authorwejs <maciej.wejs@nokia.com>2018-01-23 14:32:16 +0100
committerTakamune Cho <tc012c@att.com>2018-01-25 01:07:04 +0000
commiteec180e689f0243accf0439588c08a29186a2bc2 (patch)
treef1f71a2e70437523cb62c7462ab66a5e85d75bb8 /appc-config/appc-config-adaptor/provider/src/main
parent89643b13c43752a693b0387fe530deb8be995b7c (diff)
Sonar fixes in CCAActivator
Change-Id: I27643c8f8cf0a97b5e6bf374aee1388386f88db0 Issue-ID: APPC-454 Signed-off-by: wejs <maciej.wejs@nokia.com>
Diffstat (limited to 'appc-config/appc-config-adaptor/provider/src/main')
-rw-r--r--appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/CCAActivator.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/CCAActivator.java b/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/CCAActivator.java
index 0b022c8b0..fdf14feb0 100644
--- a/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/CCAActivator.java
+++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/onap/appc/ccadaptor/CCAActivator.java
@@ -44,7 +44,6 @@ public class CCAActivator implements BundleActivator
@SuppressWarnings("rawtypes")
private ServiceRegistration registration = null;
- //private static final Logger log = LoggerFactory.getLogger(CCAActivator.class);
private static final EELFLogger log = EELFManager.getInstance().getLogger(CCAActivator.class);
@Override
@@ -70,8 +69,7 @@ public class CCAActivator implements BundleActivator
if (!propFile.exists())
throw new ConfigurationException("Missing configuration properties file: " + propFile);
- InputStream in = new FileInputStream(propFile);
- try
+ try (InputStream in = new FileInputStream(propFile))
{
props.load(in);
}
@@ -79,24 +77,8 @@ public class CCAActivator implements BundleActivator
{
throw new ConfigurationException("Could not load properties file " + propFileName, e);
}
- finally
- {
- try
- {
- in.close();
- }
- catch (Exception e)
- {
- log.warn("Could not close FileInputStream", e);
- }
- }
log.info("Loaded properties: ");
- /*for (Object key : props.keySet())
- {
- Object value = props.get(key);
- log.info(" " + key + "=" + value);
- }*/
// Advertise adaptor
ConfigComponentAdaptor adaptor = new ConfigComponentAdaptor(props);