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

[Java] fix nested collection num elements #1306

Merged

Conversation

chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Jan 5, 2024

Closes #1305

Nested collection outer deserialization may read num elements for internal collection, which will make deserialization fail.
Currently only StringKeyMapSerializer has this bug, but future customized may have this issue. This PR make num elements defensive from such cases by using a read and reset pattern.

@chaokunyang
Copy link
Collaborator Author

@nandakumar131 Could you help review this PR?

@chaokunyang chaokunyang merged commit a9057eb into apache:main Jan 5, 2024
17 checks passed
Copy link
Contributor

@nandakumar131 nandakumar131 left a comment

Choose a reason for hiding this comment

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

LGTM.

theweipeng pushed a commit to theweipeng/fury that referenced this pull request Jan 6, 2024
Closes apache#1305 

Nested collection outer deserialization may read `num elements` for
internal collection, which will make deserialization fail.
Currently only `StringKeyMapSerializer` has this bug, but future
customized may have this issue. This PR make `num elements` defensive
from such cases by using a read and reset pattern.
@chaokunyang chaokunyang deleted the fix_nested_collection_num_elements branch April 1, 2024 06:29
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.

Serializing nested json object throws exception
3 participants