aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);