diff options
author | 2018-07-23 18:47:12 +0900 | |
---|---|---|
committer | 2018-07-24 14:25:51 +0900 | |
commit | 816033d0814d80050cf5dcc4ca8e489ff1b5c305 (patch) | |
tree | 615dcbb323eba9a55075b9e8beb1d5e4aaa9e4f9 /common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java | |
parent | 0b5d1c2bb8aa47ae582bb7d4153b220c4a81fc5f (diff) |
Fix use try-with-resources sonar issues
Replace try with try-with-resources statement
Issue-ID: SO-703
Change-Id: I971b61af2070a6856c751ed36050dd018216fe03
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java')
-rw-r--r-- | common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java b/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java index 77d67d70fc..655dc5a83d 100644 --- a/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java +++ b/common/src/main/java/org/openecomp/mso/client/defaultproperties/PolicyRestPropertiesImpl.java @@ -38,10 +38,9 @@ public class PolicyRestPropertiesImpl implements PolicyRestProperties { final Map<Object, Object> props; public PolicyRestPropertiesImpl() { File initialFile = new File("src/test/resources/policy.properties"); - InputStream targetStream; + Map<Object, Object> temp; - try { - targetStream = new FileInputStream(initialFile); + try(InputStream targetStream = new FileInputStream(initialFile)) { Properties properties = new Properties(); properties.load(targetStream); temp = properties; |