diff --git a/application/src/test/java/org/opentripplanner/test/support/ResourceLoader.java b/application/src/test/java/org/opentripplanner/test/support/ResourceLoader.java index 5670a49fab7..523a613913d 100644 --- a/application/src/test/java/org/opentripplanner/test/support/ResourceLoader.java +++ b/application/src/test/java/org/opentripplanner/test/support/ResourceLoader.java @@ -46,7 +46,12 @@ public static ResourceLoader of(Object object) { */ public File file(String path) { URL resource = url(path); - var file = new File(resource.getFile()); + File file; + try { + file = new File(new URI(resource.toString())); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } assertTrue( file.exists(), "File '%s' not found on file system.".formatted(file.getAbsolutePath())