Skip to content

Fix CSVPrinter.getRecordCount() Javadoc: the header record written by the constructor is counted - #633

Open
lenamonj wants to merge 1 commit into
apache:masterfrom
lenamonj:csv-printer-record-count-javadoc
Open

Fix CSVPrinter.getRecordCount() Javadoc: the header record written by the constructor is counted#633
lenamonj wants to merge 1 commit into
apache:masterfrom
lenamonj:csv-printer-record-count-javadoc

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 4, 2026

Copy link
Copy Markdown

CSVPrinter.getRecordCount() says "this does not include comments or headers", but the header record the constructor writes is counted: the test added with the method in CSV-313 asserts a count of 1 right after the header ("The header is the first record"). A caller reading the Javadoc gets one fewer than the printer reports whenever the format carries a header.

Javadoc only. It now says the constructor's header record is counted and that comments and printHeaders(ResultSet) are not.

Verified with the default mvn goal (checkstyle, PMD, SpotBugs, japicmp, RAT).

Found by an automated review loop I run; the change was reviewed and verified by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant