diff options
author | Arindam Mondal <arind.mondal@samsung.com> | 2020-09-24 20:10:39 +0900 |
---|---|---|
committer | 몬달아린담/Management S/W개발그룹(네트워크)/Staff Engineer/삼성전자 <arind.mondal@samsung.com> | 2020-09-24 20:10:49 +0900 |
commit | 6ca4a9ca649c70108c1b198037e479feb2039304 (patch) | |
tree | 705ba5a286adf3f89149543b8eef8cfb4abda97a | |
parent | f79adc78b65557db7cc494fe07673d7a583ecbf0 (diff) |
Fix sonar issues
Issue-ID: USECASEUI-493
Change-Id: I5e0b13347070fee993f34ce5b55fc08cf96ba2e2
Signed-off-by: arind.mondal@samsung.com
-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); |