Skip to content

Remove MatchableHandlerMapping from DelegatingHandlerMapping - #2604

Open
arimu1 wants to merge 1 commit into
spring-projects:mainfrom
arimu1:fix/2582-drop-matchable-handler-mapping
Open

arimu1 wants to merge 1 commit into
spring-projects:mainfrom
arimu1:fix/2582-drop-matchable-handler-mapping

Conversation

@arimu1

@arimu1 arimu1 commented Sep 13, 2026

Copy link
Copy Markdown

Summary

  • Stop implementing MatchableHandlerMapping on DelegatingHandlerMapping and implement HandlerMapping directly.
  • Remove match() and the related HandlerSelectionResult delegation logic that existed for HandlerMappingIntrospector.
  • Remove the unit test for pattern matching via the selected delegate (DATAREST-1193), which is obsolete without the interface.

Closes #2582

Test plan

  • ./mvnw -pl spring-data-rest-webmvc -am test (JDK 21)

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Spring Framework 7.1 removed HandlerMappingIntrospector and
MatchableHandlerMapping; drop the interface, match() delegation, and the
unit test that covered pattern matching via the selected delegate.

Closes spring-projects#2582

Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 13, 2026

@Nullable
@Override
public PathPatternParser getPatternParser() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing or making getPatternParser() package-private since it's no longer part of any interface.

@@ -1,2 +1,2 @@
/*
* Copyright 2015-2022 original author or authors.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update test file copyright year from 2015-2022 to 2015-present

@@ -42,7 +40,7 @@
* @author Oliver Gierke

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add yourself as additional author

/**
* Unit tests for {@link DelegatingHandlerMapping}.
*
* @author Oliver Gierke

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add yourself as additional author

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove use of MatchableHandlerMapping

3 participants