-
Notifications
You must be signed in to change notification settings - Fork 81
Guice Annotation Introspection doesn't observer JacksonInject.useInput values #134
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
Comments
Constructs the JacksonInject.Value instance with the useInput from the annotation instead of always setting it to null/DEFAULT. attempts to fix FasterXML#134
Have attempted to look at this here: 2.12...josephlbarnett:guice-annotation-use-input This allows me to avoid the injection failure from FasterXML/jackson-databind#962 by setting |
If suggesting this change, it probably would need to be a configurable setting just to make sure. Ideally Come to think it now, it looks like implementation there is the problem:
since it probably should be doing this merging... Would you be interested in trying a PR for |
ah the injected value issue appears to be similar if not the same as FasterXML/jackson-databind#2678 I can see if a change to AnnotationIntrospectorPair to merge id/useInputs from primary/secondary would help with the FasterXML/jackson-databind#962 part of the problem -- should it be something along the lines of "use the primary value, but if useInput is null/default, merge primary id with secondary useInput"? |
@josephlbarnett yes, merging should only "fill in the blanks", and |
As many AnnotationIntrospector implementations use default values for useInput, allow the secondary introspector's useInput value to combine with the primary's id to prevent losing the useInput value. Fixes a special case of FasterXML#962 seen by the GuiceAnnotationInspector in FasterXML/jackson-modules-base#134
As many AnnotationIntrospector implementations use default values for useInput, allow the secondary introspector's useInput value to combine with the primary's id to prevent losing the useInput value. Fixes a special case of FasterXML#962 seen by the GuiceAnnotationInspector in FasterXML/jackson-modules-base#134
…3146) As many AnnotationIntrospector implementations use default values for useInput, allow the secondary introspector's useInput value to combine with the primary's id to prevent losing the useInput value. Fixes a special case of #962 seen by the GuiceAnnotationInspector in FasterXML/jackson-modules-base#134
When trying to do something similar to FasterXML/jackson-databind#962 while using the jackson guice module to provide injectable values from the guice bindings, setting the
useInput=OptBoolean.FALSE
property is ineffective. It appears that https://github.com/FasterXML/jackson-modules-base/blob/2.12/guice/src/main/java/com/fasterxml/jackson/module/guice/GuiceAnnotationIntrospector.java#L22 always constructs a JacksonInject.Value withuseInput=null
, so there is no way to tell jackson the injected value should be "inject-only".The text was updated successfully, but these errors were encountered: