diff options
-rw-r--r-- | server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java index a53976f5..c9c16041 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java @@ -80,8 +80,7 @@ public class ResourceMonitorServiceImpl implements ResourceMonitorService { public void initConfig() { String slicingPath = System.getProperty("user.dir") + File.separator + "config" + File.separator + "slicing.properties"; Properties p = new Properties(); - try { - InputStream inputStream = new FileInputStream(new File(slicingPath)); + try(InputStream inputStream = new FileInputStream(new File(slicingPath));) { p.load(inputStream); String strKpiHours = p.getProperty("slicing.kpi.hours"); this.kpiHours = Integer.parseInt(strKpiHours); |