Fix file reading (#9)

This commit is contained in:
Egor Cherniak 2022-06-02 09:54:19 +03:00 committed by GitHub
parent 1c5db22684
commit c4acb85ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ public class FileUtil {
public static List<Region> readRegions(Resource resource) throws IOException { public static List<Region> readRegions(Resource resource) throws IOException {
final ObjectMapper objectMapper = new ObjectMapper(); final ObjectMapper objectMapper = new ObjectMapper();
return objectMapper.readValue( return objectMapper.readValue(
resource.getFile(), resource.getInputStream(),
new TypeReference<>() { new TypeReference<>() {
}); });
} }