Skip to content

Remove warnings for fluent removers. #211

@jarlesat

Description

@jarlesat

If issue#3072 in mapstruct is merged the idea-plugin will give false errors for fluent remover's.

Given the Source class:

public class Source {
    private List<String> strings = new ArrayList<>();
    public List<String> getStrings() {
        return strings;
    }
    public void setStrings(List<String> strings) {
        this.strings = strings;
    }
}

and the Target class:

public class Target {
    private List<String> strings = new ArrayList<>();
    public List<String> getStrings() {
        return strings;
    }
    public void setStrings(List<String> strings) {
        this.strings = strings;
    }
    public Target strings(List<String> strings) {
        this.strings.addAll( strings );
        return this;
    }
    public Target addString(String string) {
        strings.add( string );
        return this;
    }
    public Target removeString(String string) {
        strings.remove( string );
        return this;
    }
}

and finally this Mapper:

@Mapper
public interface MapperWithRemoverInTarget {
    Target map(Source source);
}

the plugin should no longer produce any warnings nor errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions