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); } }