diff options
Diffstat (limited to 'vnfapi')
-rw-r--r-- | vnfapi/features/src/main/resources/features.xml | 2 | ||||
-rw-r--r-- | vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VnfSdnUtil.java | 14 |
2 files changed, 4 insertions, 12 deletions
diff --git a/vnfapi/features/src/main/resources/features.xml b/vnfapi/features/src/main/resources/features.xml index 5ea07002..3da86e07 100644 --- a/vnfapi/features/src/main/resources/features.xml +++ b/vnfapi/features/src/main/resources/features.xml @@ -30,7 +30,7 @@ <feature name='sdnc-vnfapi' description="sdnc-vnfapi" version='${project.version}'> <!-- Most applications will have a dependency on the ODL MD-SAL Broker --> <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature> - <feature version="${sdnctl.sli.version}">sdnc-sli</feature> + <feature>sdnc-sli</feature> <bundle>mvn:org.onap.sdnc.northbound/vnfapi-model/${project.version}</bundle> <bundle>mvn:org.onap.sdnc.northbound/vnfapi-provider/${project.version}</bundle> <configfile finalname="etc/opendaylight/karaf/200-vnfapi-provider.xml">mvn:org.openecomp.sdnc.northbound/vnfapi-provider/${project.version}/xml/config</configfile> diff --git a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VnfSdnUtil.java b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VnfSdnUtil.java index c4d8c52f..522ee7f9 100644 --- a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VnfSdnUtil.java +++ b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VnfSdnUtil.java @@ -53,23 +53,15 @@ public class VnfSdnUtil extends MdsalHelper { File propFile = new File(ODLHOME.getAbsolutePath() + "/configuration/vnfapi.properties"); String propFileName = propFile.getAbsolutePath(); properties = new Properties(); - InputStream input = null; if (propFile.isFile() && propFile.canRead()) { - try { - input = new FileInputStream(propFile); + try (InputStream input = new FileInputStream(propFile)) { properties.load(input); LOG.info("Loaded properties from " + propFileName ); setYangMappingProperties(properties); + } catch (IOException e) { + LOG.error("Failed to close properties file " + propFileName +"\n",e); } catch (Exception e) { LOG.error("Failed to load properties " + propFileName +"\n",e); - } finally { - if (input != null) { - try { - input.close(); - } catch (IOException e) { - LOG.error("Failed to close properties file " + propFileName +"\n",e); - } - } } } } |