Skip to content

Fluent setters on fields with names starting with set are not working #1799

@nathan-me-lawrence

Description

@nathan-me-lawrence

It seems in version MapStruct 1.3.0-Final theres an issue with builders and fields that begin with the word set such as settlement or setup.

Example (with lombok)

Source:

@Builder
public class Foo {
    private String setup;
    private LocalDate settlement;

}

Target:

@Builder
public class Bar {
    private String setup;
    private LocalDate settlement;

}

Neither of these fields are mapped. But I did get it to work by adding

@Mapping(source = "settlement", target = "tlement")
@Mapping(source = "setup", target = "up")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions