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

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

                Author: ASF GitHub Bot
            Created on: 17/Sep/26 06:50
            Start Date: 17/Sep/26 06:50
    Worklog Time Spent: 10m 
      Work Description: sonarqubecloud[bot] commented on PR #1962:
URL: https://github.com/apache/struts/pull/1962#issuecomment-5710280131

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1962) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 New 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=1962&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=1962&issueStatuses=ACCEPTED)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=1962&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [100.0% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1962&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1962&metric=new_duplicated_lines_density&view=list)
  
     
   <!

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

    Worklog Id:     (was: 1042235)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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