Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue in setSchema() #481

Merged
merged 1 commit into from
Jun 26, 2024
Merged

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
4 checks passed
@cowtowncoder cowtowncoder changed the title CSV: fix issue in setSchema Fix issue in setSchema() Jun 26, 2024
@cowtowncoder cowtowncoder added csv 2.17 Fix or feature targeted at 2.17 release labels 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
2.17 Fix or feature targeted at 2.17 release csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants