-
Notifications
You must be signed in to change notification settings - Fork 54
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
Wrap possible NullPointerException #125
Conversation
Signed-off-by: Arthur Chan <[email protected]>
guava/src/main/java/com/fasterxml/jackson/datatype/guava/deser/GuavaCollectionDeserializer.java
Outdated
Show resolved
Hide resolved
guava/src/main/java/com/fasterxml/jackson/datatype/guava/deser/GuavaCollectionDeserializer.java
Outdated
Show resolved
Hide resolved
if you added the null check why do you need the try-catch still? |
Signed-off-by: Arthur Chan <[email protected]>
@yawkat Thanks for your comments. They are two fixes in different packages. But I have changed the logic to have null check in both cases and added in unit test. |
...in/java/com/fasterxml/jackson/datatype/guava/deser/GuavaImmutableCollectionDeserializer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks overall pretty good! I'll check out some details of null-handling but overall this works.
Thank you @arthurscchan ! |
@arthurscchan I think that as per https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64936 similar improvement(s) also needed for |
This PR provides a possible fix for issue #124 by adding null checking and wrapping possible NullPointerException thrown from underlying code or upstream libraries.