Skip to content

IllegalArgumentException due to lack of a cached lookupPath #26546

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

Closed
rstoyanchev opened this issue Feb 15, 2021 · 2 comments
Closed

IllegalArgumentException due to lack of a cached lookupPath #26546

rstoyanchev opened this issue Feb 15, 2021 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@rstoyanchev
Copy link
Contributor

After the changes to support parsed PathPattern in #24945, various components such as MappedInterceptor, UrlBasedCorsConfigurationSource and others expect to find a pre-resolved, cached lookupPath via ServletRequestPathUtils.getCachedPath. This is done for sub-classes for AbstratHandlerMethodMapping and AbstractUrlHandlerMapping but others that extend directly from AbstractHandlerMapping would need to call initLookupPath in order for MappedInterceptor and others to find the lookupPath.

This is the case with FlowHandlerMapping in Spring Web Flow, reported in SWF-1744, which does not need the lookupPath itself but nevertheless that still breaks auxiliary components like MappedInterceptor. We can address this in AbstractHandlerMapping#getHandlerExecution to ensure the presence of a cached lookupPath if not already added by sub-classed in getHandlerInternal.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug labels Feb 15, 2021
@rstoyanchev rstoyanchev added this to the 5.3.4 milestone Feb 15, 2021
@rstoyanchev rstoyanchev self-assigned this Feb 15, 2021
@rodwiddowson
Copy link

@rstoyanchev Just FYI. Having got through out Servlet-build glitch I just ran the reproducer against 5.3.5-SNAPSHOT and all is good. (We knew it would but but....)

@rstoyanchev
Copy link
Contributor Author

@rodwiddowson thanks for checking. The fix is in 5.3.4. You should be able to use that. It is already out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants