diff options
author | 2018-07-27 11:17:36 +0900 | |
---|---|---|
committer | 2018-08-03 16:07:43 +0900 | |
commit | 4ffef33d70eb172fb594e8b50eabaf2b59d7f936 (patch) | |
tree | 70c954a312810e68238cb89d4708251be78c7270 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model | |
parent | 40a17c1d7e5f0edca350a49210e16223a875d290 (diff) |
Fix use try-with-resources issues
Fix in epsdk-analytics
Issue-ID: PORTAL-342
Change-Id: Ia13844c65fa23fbdea01e80091c1f8573cf7ad1f
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java index ec83ffbf..60c45b4f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java @@ -3179,10 +3179,8 @@ public class ChartD3Helper { } } - try { - BufferedWriter out = new BufferedWriter(new FileWriter("test.txt")); + try(BufferedWriter out = new BufferedWriter(new FileWriter("test.txt"))) { out.write(wholeScript.toString()); - out.close(); } catch (IOException e) { e.printStackTrace(); System.out.println("Exception "); |