[
https://issues.apache.org/jira/browse/WW-5731?focusedWorklogId=1041103&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1041103
]
ASF GitHub Bot logged work on WW-5731:
--------------------------------------
Author: ASF GitHub Bot
Created on: 12/Sep/26 09:59
Start Date: 12/Sep/26 09:59
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #1921:
URL: https://github.com/apache/struts/pull/1921
Issue Time Tracking
-------------------
Worklog Id: (was: 1041103)
Time Spent: 0.5h (was: 20m)
> JasperReport7CsvExporterProvider sets the record delimiter to the field
> delimiter
> ---------------------------------------------------------------------------------
>
> Key: WW-5731
> URL: https://issues.apache.org/jira/browse/WW-5731
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 7.4.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{JasperReport7CsvExporterProvider.createExporter}} in
> {{struts2-jasperreports7-plugin}} configures the CSV exporter with
> {code:java}SimpleCsvExporterConfiguration config = new
> SimpleCsvExporterConfiguration();
> config.setFieldDelimiter(reportDelimiter);
> config.setRecordDelimiter(reportDelimiter);
> {code}
> so records are separated by the field delimiter ({{,}} by default, or
> whatever {{struts.jasperReport7.csv.defaultDelimiter}} /
> {{JasperReport7Aware.getCsvDelimiter}} returns) instead of a newline. The
> exported CSV comes out as a single line.
> The 6.x plugin ({{JasperReportsResult}}) only sets
> {{JRCsvExporterParameter.FIELD_DELIMITER}}, so this looks like a copy-paste
> slip from WW-5455. Dropping the {{setRecordDelimiter}} call restores
> JasperReports' default record delimiter ({{\n}}).
> {{JasperReport7ResultTest.testExportToCsv}} does not catch it because it only
> asserts that the output contains the report title; an assertion on the line
> count would.
> Affects every release since 7.1.0.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)