Skip to content

WW-3464 docs: the first matching wildcard mapping wins - #349

Merged
lukaszlenart merged 1 commit into
mainfrom
WW-3464-wildcard-first-match-wins
Oct 10, 2026
Merged

lukaszlenart merged 1 commit into
mainfrom
WW-3464-wildcard-first-match-wins

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

Fixes WW-3464

Summary

core-developers/wildcard-mappings.md said that when several wildcard mappings match, the last one wins and that less specific patterns must come first. The framework does the opposite: AbstractMatcher.match() returns the first pattern that matches, in declaration order, so more specific patterns must come first. This corrects the sentence.

The behaviour is pinned by a test in apache/struts#2004 (it fails when the matcher is changed to last-match-wins). The Convention-plugin ordering section further down the page is unaffected.

🤖 Generated with Claude Code

The framework resolves XML wildcard action mappings to the first pattern
that matches, in declaration order; the page claimed the last one wins
and gave the placement advice backwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukaszlenart
lukaszlenart marked this pull request as ready for review October 10, 2026 12:50
@lukaszlenart
lukaszlenart merged commit 17ea4cc into main Oct 10, 2026
1 check was pending
@lukaszlenart
lukaszlenart deleted the WW-3464-wildcard-first-match-wins branch October 10, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant