Skip to content

WW-4323 Pin that ParameterNameAware cannot accept an excluded name - #2049

Merged
lukaszlenart merged 1 commit into
mainfrom
WW-4323-parameternameaware-guard-test
Oct 22, 2026
Merged

lukaszlenart merged 1 commit into
mainfrom
WW-4323-parameternameaware-guard-test

Conversation

@lukaszlenart

Copy link
Copy Markdown
Member

Relates to WW-4323 (closed as Won't Fix)

Summary

ParametersInterceptor#isAcceptableParameter sets a parameter only when both the global name checks and ParameterNameAware#acceptableParameterName accept it. This has been the rule since 2.3.16.1 (4e98aaaa1, WW-4109 / WW-4154). WW-4323 asked to go back to the old "either check" behaviour, and that request was declined.

The existing testParameterNameAware doesn't distinguish the two behaviours, because its action already rejects every extra key itself. The new test uses an action that accepts every name plus an excluded blockedKey, and asserts that only allowedKey gets bound.

Test plan

  • mvn test -DskipAssembly -pl core -Dtest='ParametersInterceptorTest#testParameterNameAware*' runs 2 tests, both pass
  • Checked that the test catches a regression: an interceptor subclass that restores the old "either check" logic fails with expected:<{allowedKey=allowedValue}> but was:<{allowedKey=allowedValue, blockedKey=blockedValue}>

🤖 Generated with Claude Code

…uded name

ParameterNameAware narrows what the interceptor accepts; it never
overrides the global name checks. The existing testParameterNameAware
does not tell the two semantics apart because its action rejects every
extra key itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukaszlenart
lukaszlenart marked this pull request as ready for review October 22, 2026 10:09
@sonarqubecloud

Copy link
Copy Markdown

@lukaszlenart
lukaszlenart merged commit f2ea51a into main Oct 22, 2026
8 checks passed
@lukaszlenart
lukaszlenart deleted the WW-4323-parameternameaware-guard-test branch October 22, 2026 19:13
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