Skip to content

Upgrade from 1.4.1 to 1.5.2 broke primitive to wrapper classes mapping  #2921

Description

@danjee

We had a mapper that mapped Integer to int properties from an internal model to a dto (method1). In the same mapper we had a method that mapped from Integer to Short(method2). This method was used in an expression on a different mapping method(method3). After upgrading to 1.5.2 that method Integer->Short (method2) is now used instead of generating a proper Integer to int mapping like it did in 1.4.2(for method1).
This is bad for values that uses more than 16 bits and very dangerous as it can pass a lot of tests.
Is there an annotation that can be put on a method to restrict it to be used only on expressions and not be picked up by mapstruct just by types?
Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backport-1.5.xIssues that should be backported to 1.5bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions