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
Improve ambiguous method error description #2156
Comments
sjaakd
changed the title
improved error messaging
Improve ambigous method error description
Jul 19, 2020
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jul 19, 2020
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jul 19, 2020
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jul 19, 2020
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jul 19, 2020
filiphr
pushed a commit
that referenced
this issue
Jul 19, 2020
filiphr
changed the title
Improve ambigous method error description
Improve ambiguous method error description
Jul 19, 2020
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jan 4, 2021
sjaakd
pushed a commit
to sjaakd/mapstruct
that referenced
this issue
Jan 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When doing name based automatically mapping it seems that mapstruct does not a clear hint what mapping goes wrong by stating a reference to the problematic mapping.
It could be that there's somewhere a List involved which breaks our current hierarchy.
Ambiguous mapping methods found for mapping property "org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafDTO leaf" to org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafEntity: org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafEntity map1(org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafDTO dto), org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafEntity map2(org.mapstruct.ap.test.erroneous.ambigiousmapping.ErroneousMapper.LeafDTO dto
does not offer a lot of info at one hand and is verbose in another way. If here's only one such branch leading up to a leaf, it's still to manage.. But if there are many you would like to have and indication which branch to look for..
So something like: Ambiguous mapping method found for source:
trunk.branch.leaf
with a short version of the types.See also #2157
The text was updated successfully, but these errors were encountered: