Skip to content

Detect accidental misconfiguration of @JsonMixin #33992

@odrotbohm

Description

@odrotbohm

@JsonMixin exposes both a value and a type attribute, the latter being an alias of the former, which means that both attributes define an empty default value.

JsonMixinModuleEntries' registerMixinClass(…) inspects the attributes and only registers a mixin if the attribute is set. This means that a sole @JsonMixin annotation on a class will be found but dropped in that purpose. While this is a pretty obvious mistake, as one does not define which class to apply the mixin for, it can easily be overseen and we could actually detect that misconfiguration. It would be nice if ….registerMixinClass(…) could reject an empty @JsonMixin annotation to avoid this oversight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions