-
-
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
If JacksonInject
is specified for field and deserialized by the Creator, the inject process will be executed twice.
#4218
Comments
Investigated this, and it appears the hiccup occurs when we apply @k163377, @cowtowncoder, jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java Lines 524 to 534 in be56569
|
Sorry, I forgot to mention an important fact.
Is this a question about the separate annotations for creator and field in the sample code? In the special case of |
JacksonInject
is specified for field and deserialized by the Creator, the inject process will be executed multiple twice.JacksonInject
is specified for field and deserialized by the Creator, the inject process will be executed twice.
Yes, that is what I was wondering about. You have a commented @JacksonInject annotation in the constructor. But if that is the case then the test ran successfully for me in Java. |
This does sound like a bug, and I agree: injection should only happen once per property. |
Ok, did some more digging. It does look like Part of the problem is that instead of associating Injectables with |
Search before asking
Describe the bug
SSIA
Version Information
2.16.0
Reproduction
The following is a sample using
InjectableValues
that is made to count up whenfindInjectableValue
is called.Since it is deserialized only once, the first ID is expected, but it is actually the second ID.
Expected behavior
The inject process is executed only once.
In fact, if a specification is made for a parameter, the result is as expected.
Additional context
I commented but forgot to mention the above initially.
#4218 (comment)
The text was updated successfully, but these errors were encountered: