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

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

                Author: ASF GitHub Bot
            Created on: 17/Jul/26 10:18
            Start Date: 17/Jul/26 10:18
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart commented on PR #1780:
URL: https://github.com/apache/struts/pull/1780#issuecomment-5002005698

   Great, thanks a lot for this patch!




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

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

> Modernize path normalization in Include component
> -------------------------------------------------
>
>                 Key: WW-5646
>                 URL: https://issues.apache.org/jira/browse/WW-5646
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 7.2.1
>            Reporter: Arun Manni
>            Priority: Minor
>             Fix For: 7.3.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Include.getContextRelativePath() uses java.util.Stack for path 
> normalization. Stack is a legacy class (extends synchronized Vector) 
> and is unnecessary for a local variable. The method also does not 
> handle the edge case where dot-dot segments exceed the available 
> path depth, which can cause an EmptyStackException.
> This patch replaces Stack with ArrayDeque, adds an isEmpty() guard 
> before pop(), and modernizes the iteration to use an enhanced 
> for-loop. Test coverage added for edge case paths.



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

Reply via email to