Skip to content

IllegalArgumentException due to lack of a cached lookupPath #26546

@rstoyanchev

Description

@rstoyanchev

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.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions