TeaVMTool: use a single try-with-resources
@@ -460,12 +460,11 @@ 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)) {
+ try (OutputStream output = new FileOutputStream(outputFile, true);
+ Writer writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) {
additionalJavaScriptOutput(writer);
}
}
- }
if (incremental) {
programCache.flush();
