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

Jackson 2.14.0 introduces NPE #15

Open
mattnelson opened this issue Nov 7, 2022 · 0 comments
Open

Jackson 2.14.0 introduces NPE #15

mattnelson opened this issue Nov 7, 2022 · 0 comments

Comments

@mattnelson
Copy link

Have been using dependency management to use this library with more recent versions of jackson. Starting with 2.14.0 a NPE is introduced when using patch to add a new element that was previously null.

java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "com.fasterxml.jackson.core.JsonPointer.getMatchingProperty()" is null
	at io.progix.dropwizard.patch.JsonPath.<init>(JsonPath.java:70)
	at io.progix.dropwizard.patch.ContextualJsonPatch.apply(ContextualJsonPatch.java:106)

Based on the class docs of JsonPointer the rewrite is the likely culprit.
https://github.com/FasterXML/jackson-core/blob/2.14/src/main/java/com/fasterxml/jackson/core/JsonPointer.java#L16

Note that the implementation was largely rewritten for Jackson 2.14 to
reduce memory usage by sharing backing "full path" representation for
nested instances.

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

No branches or pull requests

1 participant