-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect unmapped target warning for fluent setters #121
Milestone
Comments
andye2004
added a commit
to andye2004/mapstruct-idea
that referenced
this issue
Feb 21, 2023
I do agree that this is a a bug, but the reason is not because the builders are enabled. If you see how the MapStruct processor works you'll see that irregardless whether builders are enabled or disabled there will be no warning for unmapped property. This needs to be fixed by making sure that the fluent setter return type is assignable to the type being mapped |
Closed
filiphr
added a commit
that referenced
this issue
Apr 15, 2023
filiphr
added a commit
that referenced
this issue
Apr 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know there have been a few of these reported, but this appears to be slightly different to the others I've read over.
At the organisation I work for we use avro schema files to generate classes and any time we use these generated files as the mapping target of a mapper we get an
Add unmapped target property: 'get'
warning from the IntelliJ IDEA plugin.The issue is not specifically related to the code generated by avro, but instead is related to over-ridden methods of an abstract base class that should return a
java.lang.Object
. This happens asMapstructUtil.isFluentSetter()
determines that the method is part of a builders fluent setter pattern, even when builders are explicitly disabled.I have put together an example of the issue here, although the example project doesn't use avro it does highlight the issue as outlined.
The text was updated successfully, but these errors were encountered: