You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "agamal026 (via GitHub)" <gi...@apache.org> on 2026/10/22 06:34:00 UTC
[PR] [CSV-312] Cover quoted multiline headers with RFC4180 [commons-csv]
agamal026 opened a new pull request, #640:
URL: https://github.com/apache/commons-csv/pull/640
Related to [CSV-312](https://issues.apache.org/jira/browse/CSV-312).
Add `JiraCsv312Test` to cover LF and CRLF inside quoted header names, with CRLF between records. [RFC 4180, section 2](https://www.rfc-editor.org/rfc/rfc4180#section-2) gives header names the same field grammar as data fields, including quoted fields containing line breaks. The fixture reduces the report's sample to two columns and two data rows.
The test checks both header configurations: `CSVFormat.RFC4180` retains the header as the first record, while `CSVFormat.RFC4180.builder().setHeader().get()` consumes it and maps the complete names, including their line breaks. Assertions check the header contents and both data rows. Existing tests cover multiline values and simple automatic headers separately; this adds coverage for their combination.
This one-file change records supported behavior. A separate check using the report's full sample structure also passed against Commons CSV 1.10.0; the reported exception was not reproduced.
### Validation
- Separate report-shaped compatibility check against Commons CSV 1.10.0: all four combinations of header configuration and embedded line break passed.
- Focused `JiraCsv312Test`: 4 tests, no failures, errors, or skips.
- Project default Maven goals on baseline `b217f58fac4bdf26507cde121ffb9cd50fd335e7` plus this test: BUILD SUCCESS; 989 tests, no failures or errors, 11 pre-existing skips. RAT, japicmp, SpotBugs, PMD/CPD, Javadoc, and Checkstyle completed; Checkstyle reported zero violations.
- Linux, OpenJDK 17.0.20, Maven 3.9.11. The runtime lacks a native `javadoc` executable, so `-DjavadocExecutable` selected a launcher for its installed JDK Javadoc module. Maven used the environment’s existing network proxy. The build emitted nonfatal dependency-tool warnings. No build checks were skipped.
### Public proof and reproduction
The [submitted test source](https://github.com/agamal026/commons-csv/blob/f609cb0eab7614c7eac7214aa608381dd4e8c120/src/test/java/org/apache/commons/csv/issues/JiraCsv312Test.java) matches the file used for the recorded build exactly (SHA-256 `3886666340f8965035535ff7fe2067d7d1e82c747b7474951baf7087213e7e05`). The [execution evidence](https://github.com/agamal026/commons-csv/blob/5b7686ca63bcbeb1177d7e4d2bcb6726063fb83d/contribution-review/csv-312/README.md) includes the full final build log with disclosed local-path redactions, focused test receipt, machine-readable suite totals, and labeled excerpts from earlier setup/style failures.
The build finished at 05:14:16 UTC on 22 October 2026 on the stated upstream baseline plus the test. Commit `f609cb0eab7614c7eac7214aa608381dd4e8c120` was created afterward with the same parent and exact test bytes. These are retained local execution results; they do not claim a new run or upstream CI execution.
On a normal full JDK installation, reviewers can run the focused cases and then the project's default build from that source revision:
```sh
mvn -Dtest=JiraCsv312Test test
mvn
```
### AI disclosure
This test and PR description were generated with ChatGPT (OpenAI, GPT-6 Astra Pro). AI agents performed issue and specification research, ran validation commands, and reviewed the test.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CSV-312] Cover quoted multiline headers with RFC4180 [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory closed pull request #640: [CSV-312] Cover quoted multiline headers with RFC4180
URL: https://github.com/apache/commons-csv/pull/640
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CSV-312] Cover quoted multiline headers with RFC4180 [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #640:
URL: https://github.com/apache/commons-csv/pull/640#issuecomment-6339536042
Thank you for the contribution. I’m closing this PR because its coverage is partially redundant with existing multiline-field tests, and the missing coverage belongs in the existing `CSVParserTest` class rather than a separate Jira-specific class.
Commit e9ed42afa814b07ccf3be74ece6b25e16d59be54 adds the missing coverage in `src/test/java/org/apache/commons/csv/CSVParserTest.java`, method `testHeaderWithLineBreaks`. It verifies that automatic header parsing preserves CR, LF, and CRLF inside quoted header names, consumes the header record, and supports lookup by the complete names.
This covers the useful gap without duplicating the no-header parsing coverage. The reported CSV-312 failure remains unreproduced; these tests document existing supported behavior.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org