summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramshegokar <AS00500801@techmahindra.com>2017-09-26 16:23:38 +0530
committeramshegokar <AS00500801@techmahindra.com>2017-09-26 16:23:51 +0530
commit6b04a5675e035277a90f8378fd6cf333066fd1c7 (patch)
treeaecf78c43b428be44e8ab561bb772da3d076b01d
parent8b88bb6f258cf8af9d1658a0514eba6daa31f93c (diff)
Sonar Blocker
Fix Sonar Blocker for resource leak Sonar Link: https://sonar.onap.org/component_issues/index?id=org.openecomp.appc%3Aappc#resolved=false|severities=BLOCKER|rules=squid%3AS2095 Change-Id: Id73e2153b13716706b0dce4204d8c7519850afe5 Issue-ID: APPC-236 Signed-off-by: amshegokar <AS00500801@techmahindra.com>
-rw-r--r--appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptor.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptor.java b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptor.java
index 4e59dd345..ec8727fa6 100644
--- a/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptor.java
+++ b/appc-config/appc-config-adaptor/provider/src/main/java/org/openecomp/appc/ccadaptor/ConfigComponentAdaptor.java
@@ -1008,14 +1008,12 @@ public class ConfigComponentAdaptor implements SvcLogicAdaptor
{
StringBuffer strBuff = new StringBuffer();
String line;
- try
+ try(BufferedReader in = new BufferedReader(new FileReader(fileName)))
{
- BufferedReader in = new BufferedReader(new FileReader(fileName));
while ((line = in.readLine()) != null)
{
strBuff.append(line+"\n");
}
- in.close();
}
catch (IOException e)
{