[
https://issues.apache.org/jira/browse/WW-4514?focusedWorklogId=823296&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-823296
]
ASF GitHub Bot logged work on WW-4514:
--------------------------------------
Author: ASF GitHub Bot
Created on: 04/Nov/22 08:10
Start Date: 04/Nov/22 08:10
Worklog Time Spent: 10m
Work Description: sonarcloud[bot] commented on PR #630:
URL: https://github.com/apache/struts/pull/630#issuecomment-1303097915
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=630)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=BUG)
[0
Bugs](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=VULNERABILITY)
[1
Vulnerability](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=630&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=630&resolved=false&types=SECURITY_HOTSPOT)
[0 Security
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=630&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=CODE_SMELL)
[5 Code
Smells](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=630&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=630&metric=new_coverage&view=list)
[97.1%
Coverage](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=630&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=630&metric=new_duplicated_lines_density&view=list)
[0.0%
Duplication](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=630&metric=new_duplicated_lines_density&view=list)
Issue Time Tracking
-------------------
Worklog Id: (was: 823296)
Time Spent: 40m (was: 0.5h)
> 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
> Assignee: Lukasz Lenart
> Priority: Trivial
> Fix For: 6.1.0
>
> Attachments: DefaultUrlHelper.patch
>
> Time Spent: 40m
> 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)
