-
-
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
Make the content registered with appendAnnotationIntrospector
work correctly as a fallback.
#3758
Comments
I don't quite understand suggested problem here. Also keep in mind that although name of class is Would it be possible to show an example of specific problem? |
This is the case for the following implementation( This process is intended to "use the Also, I personally feel that the |
@k163377 I think Kotlin module is really abusing expected usage of Kotlin module has often added elaborate (but not always sensible or maintainable) workarounds instead of trying to work in improving introspection with databind. Same sometimes happens with Scala module, but to a lesser degree. |
I think this is not a
Personally, I think it would be more correct if this process were done on a per-class basis. (I agree that the scope of benefit from this problem being solved is limited.) |
@k163377 I am sorry but I really do not understand what But I think one mistake Kotlin module may be doing is to do much in its AnnotationIntrospector implementation: those methods really should absolutely not try to access information across different methods and fields, but only on specific one being asked about. |
I don't think approach here is doable; will close. I think problems (which are real for sure) need to be addressed differently, possibly changing |
FYI, I think #4584 will address this issue. So once that is done, I think most of the things in |
Is your feature request related to a problem? Please describe.
AnnotationIntrospector
registered withappendAnnotationIntrospector
is expected to be called after all higher priorityAnnotationIntrospectors
have been processed.For example, if a
JsonCreator
is present in the class, thefindCreatorAnnotation
function is not expected to be called.On the other hand, in the current situation, all
AnnotationIntrospectors
will try to process one target.Describe the solution you'd like
Ensure that
AnnotationIntrospectors
registered withappendAnnotationIntrospector
are called after allAnnotationIntrospectors
with higher priority have been processed.Usage example
By changing the behavior in this way, processing related to the case where nothing is specified can be implemented.
In the
findJsonCreator
function example, such an implementation currently requires checking that the class does not contain any otherJsonCreator
.Also, it is not possible to implement the function in such a way that it does not overwrite a
JsonCreator
that is specified with a higher priority by another module.Additional context
This would require a huge change, such as eliminating
AnnotationIntrospectorPair
.Probably not possible to achieve this until
Jackson 3.0
.The text was updated successfully, but these errors were encountered: