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

Allow use of LoaderOptions.allowDuplicateKeys to enforce duplicate key detection #415

Merged

Conversation

nielsbasjes
Copy link
Contributor

If the user sets the allowDuplicateKeys to false in the LoaderOptions they expect the system will fail on a duplicate key.
It does not (see #413 ) and no errors are given to indicate they should have set it in a different way.

With this simple change it will fail on duplicate keys.

@cowtowncoder
Copy link
Member

Looks good. Just one piece of paperwork: if you haven't yet sent CLA (just needs to be done once, ever), we'd need this:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

(and usually it's easiest to print, fill & sign, scan/photo, email to info at fasterxml dot com)

and once we have it, can proceed merging the PR.

Thank you for the PR; I think this is a nice ergonomic improvement!

@cowtowncoder cowtowncoder added the cla-needed PR looks good (although may also require code review), but CLA needed from submitter label Apr 13, 2023
@nielsbasjes
Copy link
Contributor Author

@cowtowncoder I have sent the signed CLA just now.

@cowtowncoder cowtowncoder removed the cla-needed PR looks good (although may also require code review), but CLA needed from submitter label Apr 14, 2023
@cowtowncoder
Copy link
Member

CLA received.

@cowtowncoder cowtowncoder changed the title feat: Use LoaderOptions allowDuplicateKeys to enforce duplicate key detection. Use LoaderOptions.allowDuplicateKeys to enforce duplicate key detection Apr 14, 2023
@cowtowncoder cowtowncoder added this to the 2.15.0-rc3 milestone Apr 14, 2023
@cowtowncoder cowtowncoder merged commit 1a3b86d into FasterXML:2.15 Apr 14, 2023
3 checks passed
cowtowncoder added a commit that referenced this pull request Apr 14, 2023
@cowtowncoder cowtowncoder changed the title Use LoaderOptions.allowDuplicateKeys to enforce duplicate key detection Allow use of LoaderOptions.allowDuplicateKeys to enforce duplicate key detection May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
yaml Issue related to YAML format backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants