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

ObjectNode put methods should do null check for key #4997

Closed
cowtowncoder opened this issue Feb 27, 2025 · 2 comments
Closed

ObjectNode put methods should do null check for key #4997

cowtowncoder opened this issue Feb 27, 2025 · 2 comments
Labels
2.19 Issues planned at 2.19 or later

Comments

@cowtowncoder
Copy link
Member

Currently various put() (and related) methods of ObjectNode allow null as key -- causing potential/likely trouble if attempting to serialize such nodes. Nulls should not be allowed as keys.

cowtowncoder added a commit that referenced this issue Feb 27, 2025
@cowtowncoder cowtowncoder added the 2.19 Issues planned at 2.19 or later label Feb 28, 2025
@JooHyukKim
Copy link
Member

In 2.19? I wonder this should be considered breaking change or... now-working-as-expected

@cowtowncoder
Copy link
Member Author

Yes, 2.19. Use of null keys has never been supported, but we haven't done eager validation.
We should, I think, otherwise there can be harder to diagnose broken ObjectNodes
(had one such case at work, I think, but diagnosing was difficult when whatever built ObjectNodes didn't fail, but code further down tried to serialize constructed big object grap).

Put another way: I cannot see any legit use case for null keys for ObjectNodes.

@cowtowncoder cowtowncoder changed the title ObjectNode put methods should do null check ObjectNode put methods should do null check for key Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.19 Issues planned at 2.19 or later
Projects
None yet
Development

No branches or pull requests

2 participants