[
https://issues.apache.org/jira/browse/WW-5732?focusedWorklogId=1041106&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1041106
]
ASF GitHub Bot logged work on WW-5732:
--------------------------------------
Author: ASF GitHub Bot
Created on: 12/Sep/26 10:11
Start Date: 12/Sep/26 10:11
Worklog Time Spent: 10m
Work Description: sonarqubecloud[bot] commented on PR #1922:
URL: https://github.com/apache/struts/pull/1922#issuecomment-5645247266
## [](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=1922)
**Quality Gate failed**
Failed conditions
 [B Maintainability Rating on New
Code](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=1922&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
(required ≥ A)
<!
Issue Time Tracking
-------------------
Worklog Id: (was: 1041106)
Time Spent: 20m (was: 10m)
> JasperReport7Result Javadoc example uses upper-case format "CSV" which fails
> the exporter lookup
> ------------------------------------------------------------------------------------------------
>
> Key: WW-5732
> URL: https://issues.apache.org/jira/browse/WW-5732
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Trivial
> Fix For: 7.4.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The class Javadoc of {{JasperReport7Result}} (snippet {{example1}}) shows
> {code:xml}<result name="success" type="jasperReport7">
> <param name="location">foo.jasper</param>
> <param name="dataSource">mySource</param>
> <param name="format">CSV</param>
> </result>
> {code}
> but the result resolves the exporter with
> {code:java}invocation.getInvocationContext().getContainer().getInstance(JasperReport7ExporterProvider.class,
> format)
> {code}
> and the providers are registered in {{struts-plugin.xml}} under the
> lower-case names {{pdf}}, {{csv}}, {{html}}, {{xlsx}}, {{xml}}, {{rtf}} (the
> values of {{JasperReport7Constants.FORMAT_*}}). The container lookup is
> case-sensitive and {{format}} is never lower-cased, so copying the example
> gives {{StrutsException: No exporter found for format: CSV}}.
> The 6.x plugin used upper-case constants ({{FORMAT_CSV = "CSV"}}), which is
> presumably where the example came from.
> Either fix the example to {{csv}} and state in the {{format}} parameter
> description that the value is case-sensitive, or lower-case {{format}} in
> {{initializeProperties}} so both spellings work; the second also eases
> migration from the 6.x plugin. The site page added in WW-5728 documents the
> lower-case values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)