-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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-databind 2.9.0-pr1 breaks builder deserialization #1557
Milestone
Comments
Ugly hack workaround: diff --git a/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotationIntrospectorPair.java b/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotationIntrospectorPair.java
index 408f2c9..6afe3de 100644
--- a/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotationIntrospectorPair.java
+++ b/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotationIntrospectorPair.java
@@ -705,7 +705,7 @@ public class AnnotationIntrospectorPair
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) {
JsonPOJOBuilder.Value result = _primary.findPOJOBuilderConfig(ac);
- return (result == null) ? _secondary.findPOJOBuilderConfig(ac) : result;
+ return (result == null || result == JsonPOJOBuilder.Value.empty()) ? _secondary.findPOJOBuilderConfig(ac) : result;
}
// // // Deserialization: method annotations |
I'd love to fix this, but I would need a reproduction that does not rely on auto-value lib itself: generated sources are ok but ideally simpified example. |
Fixed via @stevenschlansker 's patch, will be in 2.9.0.pr2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a Builder like,
This code worked with 2.8 branch, but updating the 2.9.0-pr1 (to test out #1402) breaks it. It seems that commit e452793 changed the default behavior of
AnnotationInspector#findPOJOBuilderConfig()
to returning a default value rather thannull
.We end up with a
ParameterNamesAnnotationIntrospector
stacked on top of aJacksonAnnotationIntrospector
. Previously,AnnotationIntrospectorPair#findPOJOBuilderConfig
would try the former, get null, then fallback to the latter. Now it gets a bogus empty configuration from the former and never gets the correct configuration from the latter.The text was updated successfully, but these errors were encountered: