From 3ff16511844e891c5bc7c7900f8aff461557d697 Mon Sep 17 00:00:00 2001 From: Ulugbek Date: Sat, 9 Jul 2022 15:50:29 +0200 Subject: [PATCH] TeaVMTool: use a single try-with-resources --- tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java index 17148864e..e77f8d8dc 100644 --- a/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java +++ b/tools/core/src/main/java/org/teavm/tooling/TeaVMTool.java @@ -460,10 +460,9 @@ public class TeaVMTool { generatedFiles.add(outputFile); if (targetType == TeaVMTargetType.JAVASCRIPT) { - try (OutputStream output = new FileOutputStream(outputFile, true)) { - try (Writer writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) { - additionalJavaScriptOutput(writer); - } + try (OutputStream output = new FileOutputStream(outputFile, true); + Writer writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) { + additionalJavaScriptOutput(writer); } }