First part of onap rename
[appc.git] / appc-config / appc-config-adaptor / provider / src / main / java / org / openecomp / appc / ccadaptor / CCAActivator.java
index 32119f0..d9d2b11 100644 (file)
  * ============LICENSE_END=========================================================
  */
 
-package org.openecomp.appc.ccadaptor;
+package org.onap.appc.ccadaptor;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
 import java.util.Properties;
 
-import org.openecomp.sdnc.sli.ConfigurationException;
+import org.onap.ccsdk.sli.core.sli.ConfigurationException;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
@@ -39,7 +39,7 @@ public class CCAActivator implements BundleActivator
 {
 
     private static final String CCA_PROP_FILE_VAR = "SDNC_CCA_PROPERTIES";
-    private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
+    private static final String SDNC_CONFIG_DIR_VAR = "APPC_CONFIG_DIR";
 
     @SuppressWarnings("rawtypes")
     private ServiceRegistration registration = null;
@@ -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);