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

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

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

   ## [![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=1922) 
**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=1922&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=1922&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=1922&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [83.3% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=1922&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=1922&metric=new_duplicated_lines_density&view=list)
  
     
   <!

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

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

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

Reply via email to