[ https://issues.apache.org/jira/browse/WW-4514?focusedWorklogId=823286&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-823286 ]
ASF GitHub Bot logged work on WW-4514: -------------------------------------- Author: ASF GitHub Bot Created on: 04/Nov/22 07:51 Start Date: 04/Nov/22 07:51 Worklog Time Spent: 10m Work Description: lukaszlenart opened a new pull request, #630: URL: https://github.com/apache/struts/pull/630 This PR fixes the issue plus extracts logic related to building a query string into a new class and defines a new extension point which then can be used by users to provide their own implementations. Closes [WW-4514](https://issues.apache.org/jira/browse/WW-4514) Issue Time Tracking ------------------- Worklog Id: (was: 823286) Remaining Estimate: 0h Time Spent: 10m > DefaultUrlHelper.buildParametersString appends just ? if collection is empty > ---------------------------------------------------------------------------- > > Key: WW-4514 > URL: https://issues.apache.org/jira/browse/WW-4514 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions > Affects Versions: 2.3.24 > Reporter: Jasper Rosenberg > Priority: Trivial > Fix For: 6.1.0 > > Attachments: DefaultUrlHelper.patch > > Time Spent: 10m > Remaining Estimate: 0h > > DefaultUrlHelper.buildParametersString() checks that it has parameters to > append before adding the first "?"/"&", but if the only parameters are empty > Iterables/Arrays, then it shouldn't do that. > I'd suggest adding the new query string to a StringBuilder, and then if it is > non-empty, append that with the separator to the link at the end. (See patch) -- This message was sent by Atlassian Jira (v8.20.10#820010)