Skip to content

Conversation

robrua
Copy link
Contributor

@robrua robrua commented Jan 26, 2018

Currently if the top-level collection property is null it will be handled gracefully, but if a collection of collections contains a null element it currently causes an NPE on the inner CollectionCodec.encode call while attempting to loop through the null collection's values.

… deferring to codec.encode. This fixes an NPE when a POJO has a nested collection element and one of the nested collection values is null.
@robrua robrua changed the title Fix for NPE in POJO codec when a POJO has a nested collection property and one of the nested collections has null value Fix for NPE in POJO codec when a POJO has a nested collection property and one of the nested values is null Jan 26, 2018
@rozza
Copy link
Member

rozza commented Jan 29, 2018

Thanks @robrua,

I reworded your commit (bb07462) to link to the jira issue: JAVA-2756. When adding a test case I realised we had to handle decoding and I noticed Map values had the same issue (e38c3f7).

Thanks again,

Ross

@rozza rozza closed this Jan 29, 2018
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.

2 participants