Bean with getter returning Stream is treating the Stream as an alternative setter
Expected behavior
A getter returning a Stream should not be treated as an alternative setter
Actual behavior
The getter is treated as an alternative setter
Steps to reproduce the problem
public static class Foo { List<String> values; public List<String> getValues() { return values; } public void setValues(List<String> values) { this.values = values; } } public static class Bar { List<String> values; public List<String> getValues() { return this.values; } public void setValues(List<String> values) { this.values = values; } // This is the root of the problem; try replacing with any non-collection type. public Stream<String> getX() { throw new UnsupportedOperationException(); } } @Mapper public interface BarMapper { @Mapping(target = "values", source = "values") Bar toBar(Foo foo); }
From #3425
MapStruct Version
1.5.5.Final / 1.6.0.Beta1