[ 
https://issues.apache.org/jira/browse/WW-5743?focusedWorklogId=1042229&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1042229
 ]

ASF GitHub Bot logged work on WW-5743:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Sep/26 06:44
            Start Date: 17/Sep/26 06:44
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #340:
URL: https://github.com/apache/struts-site/pull/340

   Companion to 
[apache/struts#1962](https://github.com/apache/struts/pull/1962) — 
[WW-5743](https://issues.apache.org/jira/browse/WW-5743).
   
   Reorders the key list on `core-developers/wildcard-mappings.md` (the `**` 
count is now first) and adds a one-line note on the 7.3.0 order so readers on 
that release aren't misled. Merge after the code PR lands.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 1042229)
    Time Spent: 20m  (was: 10m)

> ActionNameSpecificityComparator can rank a broad ** pattern ahead of a 
> narrower */* one
> ---------------------------------------------------------------------------------------
>
>                 Key: WW-5743
>                 URL: https://issues.apache.org/jira/browse/WW-5743
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.4.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Follow-up to WW-3784 (7.3.0), which introduced 
> {{ActionNameSpecificityComparator}} in the Convention plugin so annotated 
> wildcard actions are matched most-specific-first instead of in class-scan 
> order.
> The comparator's keys, in order, are: fewer wildcard tokens first, more 
> literal characters first, fewer path-spanning {{\*\*}} tokens first, then 
> lexical. Because the raw token count comes before the {{\*\*}} count, a 
> pattern with one {{\*\*}} outranks a pattern with two {{\*}} even though 
> {{\*\*}} crosses {{/}} and {{\*}} does not ({{WildcardHelper}} MATCH\_PATH vs 
> MATCH\_FILE) — so {{\*\*}} is the broader pattern of the two and should lose:
> * {{a/\*\*}} — 1 wildcard token, 1 path-spanning
> * {{a/\*/\*}} — 2 wildcard tokens, 0 path-spanning
> Today the first sorts ahead of the second and shadows it for {{a/x/y}}.
> Proposed refinement: lift the {{**}}-count key above the raw token-count key 
> (fewer {{\*\*}} first, then fewer tokens, then more literals). Ordering stays 
> per-package by design. Worth a test pair in 
> {{ActionNameSpecificityComparatorTest}} for exactly the {{a/\*\*}} vs 
> {{a/\*/\*}} case, plus the {{\{var\}}} equivalent for 
> {{NamedVariablePatternMatcher}} users.
> Fix version intentionally left unset.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to