* ============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;
{
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;
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);