Skip to content

WW-2963 fix(core): resolve default-action-ref via wildcard matching#1623

Open
lukaszlenart wants to merge 1 commit intorelease/struts-6-8-xfrom
fix/WW-2963-default-action-ref-wildcard
Open

WW-2963 fix(core): resolve default-action-ref via wildcard matching#1623
lukaszlenart wants to merge 1 commit intorelease/struts-6-8-xfrom
fix/WW-2963-default-action-ref-wildcard

Conversation

@lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented Mar 12, 2026

Summary

Fixes WW-2963

  • Port of PR WW-2963 default-action-ref fails to find wildcard named actions #1614 from Struts 7 to Struts 6.x
  • When default-action-ref points to an action name that only exists as a wildcard pattern (e.g. "movie-input" matching "movie-*"), the framework now falls back to wildcard matching after the exact lookup fails
  • Adds 3 tests covering wildcard resolution, exact match, and no-match scenarios

Changes

  • DefaultConfiguration.java — 3-line addition: wildcard matcher fallback after exact defaultActionRef lookup fails
  • ConfigurationTest.java — 3 new tests: testDefaultActionRefWithWildcard, testDefaultActionRefWithExactMatch, testDefaultActionRefWithWildcardNoMatch
  • xwork-sample.xml — 3 new test packages with corresponding namespaces

Test plan

  • ./mvnw -pl core test -Dtest=com.opensymphony.xwork2.config.ConfigurationTest — all 21 tests pass
  • Full core test suite: ./mvnw -pl core clean test

🤖 Generated with Claude Code

When a default-action-ref points to an action name that only exists as a
wildcard pattern (e.g. "movie-input" matching "movie-*"), the framework
now falls back to wildcard matching after the exact lookup fails.

Port of PR #1614 from Struts 7 to Struts 6.x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
24 Security Hotspots
42.6% Coverage on New Code (required ≥ 80%)
3.4% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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