-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pseudo restore PathMappings.getMatch(String)
for backwards compat reasons
#8628
Comments
A bit surprised someone is using PathMapping directly like this. Anyway, the |
Ah, yes. The API is designed now to return The A pseudo backward compatible fix is to have the old A quick workaround would be ... public class OldPathMappings<E> extends PathMappings<E>
{
@Override
public MappedResource<E> getMatch(String path)
{
MatchedResource<E> matchedPath = getMatched(path);
return new MappedResource<>(matchedPath.getPathSpec(), matchedPath.getResource());
}
} This API |
+ This returns a MappedResource, but not the stored instance, but a new instance of MappedResource every time. + Flagged deprecated APIs for removal as well Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
A pseudo backward compat option has been opened as PR #8629 |
…g-getmatch Issue #8628 - pseudo restore `PathMappings.getMatch(String)`
This issue affects Jetty 9.4.49 too. |
@margus2 Jetty 9.4.x is at End of Community support. |
PathMappings.getMatch(String)
for backwards compat reasons
Jetty version(s)
10.0.10
Java version/vendor
Not relevant
OS type/version
Not relevant
Description
Commit
8de55150fe1889c2c748b821a4f76bce9cbf8f9a
deprecatedPathMappings#getMatch(String)
and made it throw anUnsupportedOperationException
.This is a non-backwards compatible change. Our code now throws exceptions. I suspect this should not be done in a minor release.
How to reproduce?
Not relevant
The text was updated successfully, but these errors were encountered: