summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/CCAActivator.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/CCAActivator.java b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/CCAActivator.java
index 5863c1d7d..96cda9ca2 100644
--- a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/CCAActivator.java
+++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/CCAActivator.java
@@ -70,28 +70,14 @@ 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);
+ log.info("Loaded properties: ");
}
catch (Exception e)
{
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: ");
// Advertise adaptor
ConfigComponentAdaptor adaptor = new ConfigComponentAdaptor(props);