NPE deserializing Recursive Structure When Ignoring Properties (same as #1755) #4417
Closed
1 task done
Labels
duplicate
Duplicate of an existing (usually earlier) issue
has-failing-test
Indicates that there exists a test case (under `failing/`) to reproduce the issue
Search before asking
Describe the bug
Disclaimer; This may be duplicate of #1755 - But thought I should raise separately in case root-cause is different, as that is raised against 2.9.
Starting with Jackson-Databind 2.12.0, attempting to deserialize a recursive data structure with a custom
JacksonAnnotationIntrospector
configured to ignore properties, for example:A
NullPointerException
will be thrown during deserialization:Changing the
Value
object to allow Setters will avoid theNullPointerException
from occurring:Version Information
Affects starting from 2.12.0, confirmed issue still present through 2.17.0-rc1.
Reproduction
Here is a sample project to reproduce the issue
reproduce-project.zip
pom.xml
src/test/java/test/ReproduceTest.java
Build with Java 17 and
mvn clean test
Expected behavior
I thought object should deserialize without hitting NPE without needing to explicitly configure
withAllowSetters()
.Additional context
No response
The text was updated successfully, but these errors were encountered: