diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java b/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java index c2871a58cab..179d2d1bd50 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java @@ -256,10 +256,11 @@ public class PathMappings implements Iterable>, Dumpable /** * @deprecated use {@link #getMatched(String)} instead */ - @Deprecated + @Deprecated(forRemoval = true) public MappedResource getMatch(String path) { - throw new UnsupportedOperationException("Use .getMatched(String) instead"); + MatchedResource matchedPath = getMatched(path); + return new MappedResource<>(matchedPath.getPathSpec(), matchedPath.getResource()); } @Override @@ -271,7 +272,7 @@ public class PathMappings implements Iterable>, Dumpable /** * @deprecated use {@link PathSpec#from(String)} instead */ - @Deprecated + @Deprecated(forRemoval = true) public static PathSpec asPathSpec(String pathSpecString) { return PathSpec.from(pathSpecString);