Skip to content
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

Add AnnotationIntrospector.resolveSetterConflict(...) to allow custom setter conflict resolution #1044

Closed
cowtowncoder opened this issue Dec 12, 2015 · 0 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: inspired by #1033)

Although Jackson tries to figure out reasonable rules for precedence of setter to use, in case of overlap, it is not possible to resolve all kinds of application/usage-specific cases. So to allow plugging in custom handling, let's add a mechanism overridable via AnnotationIntrospector that makes it possible to resolve at least some of most common cases.

In addition, JacksonAnnotationIntrospector should implement very basic heuristics, where:

  • Primitive type has higher precedence than non-primitive
  • For other types, java.lang.String has precedence over other non-primitive types.

This logic is overridable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant