graben commented on code in PR #17091:
URL: https://github.com/apache/camel/pull/17091#discussion_r1948137313
##########
components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java:
##########
@@ -53,15 +53,15 @@ protected CsvMarshaller(CSVFormat format) {
public static CsvMarshaller create(CSVFormat format, CsvDataFormat
dataFormat) {
org.apache.camel.util.ObjectHelper.notNull(format, "CSV format");
org.apache.camel.util.ObjectHelper.notNull(dataFormat, "CSV data
format");
+ // Get header columns before potential clearing
+ String[] headers = format.getHeader();
Review Comment:
The reason is quite simple, `CsvDataFormat.getActiveFormat` is setting
header information into `CsvFormat`. With this change, you'll catch both cases
header set via `DataFormat` or via `CsvFormat` by reference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]