TeaVMTool: use a single try-with-resources

This commit is contained in:
Ulugbek 2022-07-09 15:50:29 +02:00 committed by Alexey Andreev
parent 0068198abd
commit 3ff1651184

View File

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