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 collection serialization NPE when all elements are null #1086

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

chaokunyang
Copy link
Collaborator

What do these changes do?

When all elements are null, actual collection element type will be null. If there is no collection generics, the declared collection element type will be null too, then serialization for such collection will throw NullPointerException:
image

Related issue number

Closes #1085

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

@chaokunyang chaokunyang merged commit b40cb24 into apache:main Nov 13, 2023
15 checks passed
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.

[Java] AbstractCollectionSerializer serialize Collection with only null object inside has NPE problem
1 participant