Skip to content

Commit

Permalink
Use default system encoding when reading test result JSON-file
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseanttila-cai committed Apr 2, 2020
1 parent e864a78 commit 803d703
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.google.common.collect.ImmutableMap;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -49,7 +50,8 @@ public RunResult parse() throws IOException {
}

private List<TestResult> getTestResults() throws IOException {
byte[] json = Files.readAllBytes(path.resolve(RESULT_FILE));
String json = String.join("", Files.readAllLines(
path.resolve(RESULT_FILE), Charset.defaultCharset()));
List<TestResult> results = new ArrayList<>();

JsonNode tree = mapper.readTree(json);
Expand Down

0 comments on commit 803d703

Please sign in to comment.