Expected behavior
Currently we can control ADDER_PREFERRED at mapper or mapper config level
We might have set ADDER_PREFERRED for the whole mapper, but also have provided the direct mapping to the collection, so for example:
@Value
@Builder
class A {
@Singular("addValue")
List<String> values;
}
@Value
@Builder
class B {
Map<String, String> values;
}
@Value
@Builder
class C {
List<Integer> values;
}
interface CustomMapper {
A map(B b); // this fails, ideally it can fallback to setter
A map(C c); // this uses adder
List<String> map(Map<String, String> map) {
// custom logic
}
}
Actual behavior
No response
Steps to reproduce the problem
Mentioned the reproducer above
MapStruct Version
1.6.3
Expected behavior
Currently we can control ADDER_PREFERRED at mapper or mapper config level
We might have set ADDER_PREFERRED for the whole mapper, but also have provided the direct mapping to the collection, so for example:
Actual behavior
No response
Steps to reproduce the problem
Mentioned the reproducer above
MapStruct Version
1.6.3