mapstruct / mapstruct/mapstruct-idea

Remove warnings for fluent removers.

Open
#211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
168
Forks
41
PR merge metrics
No merged PRs in 30d

Description

If [issue#3072](https://github.com/mapstruct/mapstruct/issues/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 strings = new ArrayList<>();
public List getStrings() {
return strings;
}
public void setStrings(List strings) {
this.strings = strings;
}
}

and the Target class:

public class Target {
private List strings = new ArrayList<>();
public List getStrings() {
return strings;
}
public void setStrings(List strings) {
this.strings = strings;
}
public Target strings(List 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Source, Target, and MapperWithRemoverInTarget example in the IntelliJ IDEA plugin with the MapStruct fluent-remover change from issue #3072. Trace the diagnostics that inspect the Target methods; done means the example produces no warnings or errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.