Skip to content

Skip trailing delimiter on comment lines in printComment#623

Merged
garydgregory merged 1 commit into
apache:masterfrom
rootvector2:comment-trailing-delimiter
Jul 16, 2026
Merged

Skip trailing delimiter on comment lines in printComment#623
garydgregory merged 1 commit into
apache:masterfrom
rootvector2:comment-trailing-delimiter

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

printComment closes each comment line with println(), which appends the trailing delimiter when setTrailingDelimiter(true) is set. So a multi-line comment prints # line1, / # line2, and the parser reads that delimiter back as part of the comment text. Found round-tripping comments through a printer with the trailing delimiter enabled.

Close comment lines with the record separator only. The trailing delimiter is documented as following the last value of a record, and a comment is not a record, so the record and header paths keep calling println() and stay unchanged.

@garydgregory garydgregory changed the title skip trailing delimiter on comment lines in printComment Skip trailing delimiter on comment lines in printComment Jul 16, 2026
@garydgregory
garydgregory merged commit 269213d into apache:master Jul 16, 2026
16 checks passed
@garydgregory

Copy link
Copy Markdown
Member

Good find @rootvector2 ; merged 🚀

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.

2 participants