Skip to content

Conversation

pjfanning
Copy link
Member

I was looking at some improvements to CsvParser class suggested by my IDE and noticed what looks like a bug in the setSchema method.

} else if (schema == null) {
schema = EMPTY_SCHEMA;
_schema = EMPTY_SCHEMA;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like a bug to me - the old code was updating the input param (schema) instead of the _schema.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I concur this is a bug. I think I'll backport this in 2.17 as well.

@cowtowncoder cowtowncoder merged commit 3712bec into FasterXML:2.18 Jun 26, 2024
@cowtowncoder cowtowncoder changed the title CSV: fix issue in setSchema Fix issue in setSchema() Jun 26, 2024
@cowtowncoder cowtowncoder added this to the 2.17.2 milestone Jun 26, 2024
@cowtowncoder
Copy link
Member

Backported in 2.17.2

cowtowncoder pushed a commit that referenced this pull request Jun 26, 2024
cowtowncoder added a commit that referenced this pull request Jun 26, 2024
@pjfanning pjfanning deleted the schema-bug branch June 26, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants