Repository navigation
WW-3464 test(config): pin first-match-wins wildcard order - #2004
Merged
Merged
Conversation
When several XML wildcard action names match a request, the first one declared in the package wins. Cover both declaration orders with the ticket's `**` / `Project**` patterns so the behaviour cannot drift from what the documentation describes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes WW-3464
Summary
The ticket reports that XML wildcard action mappings resolve to the first matching pattern, while the docs claim "the last one wins". The framework behaviour is correct and matches the
AbstractMatcher/ActionConfigMatcherJavadoc; the documentation is wrong and is corrected in a companion struts-site PR.This PR is test-only: it pins the first-match-wins rule end to end (XML →
PackageConfig→RuntimeConfiguration→ActionConfigMatcher) using the ticket's own**/Project**patterns in both declaration orders, so the behaviour cannot silently drift.Verification
main.AbstractMatcher.match()temporarily changed to last-match-wins (thebreakremoved), both fail with the ticket's symptom (expected:<[execute]> but was:<[input]>and vice versa).xwork-sample.xmlstay green, exceptDefaultFileManagerTest(jar/zip/wsjar URL handling), which fails identically on cleanmain.Convention-plugin ordering (most-specific-first, WW-3784 / WW-5743) is a separate path and is not affected.
🤖 Generated with Claude Code