diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java index 405e246a33c..55ac974611a 100644 --- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java +++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java @@ -40,11 +40,11 @@ public class PathResource extends Resource { private static final Logger LOG = LoggerFactory.getLogger(PathResource.class); - public static Index SUPPORTED_SCHEMES = new Index.Builder() - .caseSensitive(false) - .with("file") - .with("jrt") - .build(); + /** + * @deprecated Using ResourceFactoryInternals.isSupported() instead. + */ + @Deprecated(since = "12.0.4", forRemoval = true) + public static Index SUPPORTED_SCHEMES = new Index.Builder().build(); // The path object represented by this instance private final Path path; @@ -164,7 +164,7 @@ public static boolean isSameName(Path pathA, Path pathB) { if (!uri.isAbsolute()) throw new IllegalArgumentException("not an absolute uri: " + uri); - if (!bypassAllowedSchemeCheck && !SUPPORTED_SCHEMES.contains(uri.getScheme())) + if (!bypassAllowedSchemeCheck && !ResourceFactoryInternals.isSupported(uri.getScheme())) throw new IllegalArgumentException("not an allowed scheme: " + uri); if (Files.isDirectory(path))