StandardCharsets used where possible; try-with-resources used; cleanup

This commit is contained in:
Tagir Valeev
2018-03-14 15:59:37 +07:00
parent 6f30e387cf
commit 7c8e64da81
2 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import org.jetbrains.java.decompiler.main.extern.IResultSaver;
import org.jetbrains.java.decompiler.util.InterpreterUtil;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
@@ -238,7 +239,7 @@ public class ConsoleDecompiler implements IBytecodeProvider, IResultSaver {
ZipOutputStream out = mapArchiveStreams.get(file);
out.putNextEntry(new ZipEntry(entryName));
if (content != null) {
out.write(content.getBytes("UTF-8"));
out.write(content.getBytes(StandardCharsets.UTF_8));
}
}
catch (IOException ex) {