Skip to content

Commit 8faa9bb

Browse files
committed
Correct serialization logic more correctly
1 parent deb09c8 commit 8faa9bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site-validation/bad-image-issue.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
import picocli.CommandLine.Command;
1818
import picocli.CommandLine.Option;
1919

20+
import java.io.File;
2021
import java.io.IOException;
2122
import java.io.UncheckedIOException;
2223
import java.nio.file.FileSystems;
2324
import java.nio.file.Files;
2425
import java.nio.file.Path;
26+
import java.util.Arrays;
2527
import java.util.List;
2628
import java.util.Collections;
2729

@@ -175,7 +177,7 @@ private List<BadImage> readTestOutputFile() throws IOException {
175177
.getPath(OUTPUT_PATH);
176178
if (Files.exists(filePath)) {
177179
try {
178-
return new ObjectMapper().readValue(Files.lines(filePath), BadImage[].class);
180+
return Arrays.asList(new ObjectMapper().readValue(filePath.toFile(), BadImage[].class));
179181
} catch (JsonProcessingException e) {
180182
throw new RuntimeException(e);
181183
}

0 commit comments

Comments
 (0)