StandardCharsets used where possible; try-with-resources used; cleanup
This commit is contained in:
@@ -8,6 +8,7 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -106,7 +107,7 @@ public class DecompilerTestFixture {
|
||||
|
||||
private static String getContent(File expected) {
|
||||
try {
|
||||
return new String(InterpreterUtil.getBytes(expected), "UTF-8").replace("\r\n", "\n");
|
||||
return new String(InterpreterUtil.getBytes(expected), StandardCharsets.UTF_8).replace("\r\n", "\n");
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in New Issue
Block a user