Skip to content

ClasspathScanner fails if classloader contains custom URI scemes #2212

@laeubi

Description

@laeubi

Describe the bug
ClasspathScanner uses Path.get(URI) to convert an URI to a path. This fails if the URI does not conforms to the contracts of that method and throws an FileSystemNotFoundException

Expected behavior
ClasspathScanner ignores URIs it can not convert.

Additional context
Caused by: java.nio.file.FileSystemNotFoundException: Provider "bundleresource" not installed
at java.base/java.nio.file.Path.of(Path.java:212)
at java.base/java.nio.file.Paths.get(Paths.java:97)
at io.cucumber.core.resource.CloseablePath.open(CloseablePath.java:23)
at io.cucumber.core.resource.PathScanner.open(PathScanner.java:39)
at io.cucumber.core.resource.PathScanner.findResourcesForUri(PathScanner.java:26)
at io.cucumber.core.resource.ClasspathScanner.findClassesForUri(ClasspathScanner.java:72)
at io.cucumber.core.resource.ClasspathScanner.lambda$findClassesForUris$3(ClasspathScanner.java:64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions