Conversation
|
One think that I forgot to add is the warning about raw map or a map that does not have Is there something in backwards compatibility way that we need to think about? |
|
Thanks for bringing this feature further! From what i understand about the polishing, it looks great! So i agree 👍 . But if i understand it correct, in this case the message will only be a warning and does not stop the mapper from working, am i correct? |
processor/src/main/java/org/mapstruct/ap/internal/util/Message.java
Outdated
Show resolved
Hide resolved
processor/src/main/java/org/mapstruct/ap/internal/util/Message.java
Outdated
Show resolved
Hide resolved
|
@filiphr .. I guess we do need to update the documentation as well.. right? |
You are right @sjaakd. I will add some documentation to this as well.
@ckosmowski yes there will be a warning. However, the mapping will not work in this case because raw maps are skipped. Your implementation was doing that already. Check: I added the assertions, but the was null anyways. Only a |
|
@sjaakd, I've added some docs, added some more tests and also addressed your comments about the warning messages. Please have a look and let me know what you think. |
documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc
Outdated
Show resolved
Hide resolved
|
|
||
| [WARNING] | ||
| ==== | ||
| When a raw map or a map that does not have a String as a key is used, then a warning will be generated. |
There was a problem hiding this comment.
How is the key interpreted in such case.. guess we need to add that in the doc.
There was a problem hiding this comment.
It isn't, I thought that it is clear at the beginning of the section
There are situations when a mapping from a
Map<String, ???>into a specific bean is needed.
Co-authored-by: Filip Hrisafov <filip.hrisafov@gmail.com>
|
Awesome that this change made it to the project! Thanks guys. I would love to be added to the copyright notice of the project like the other contributors if possible as a reference. Thanks in advance :-) |
|
Thanks for letting us know @ckosmowski. You've been added to the copyright notice 0b2c7e5. I did a pass of all the commits, but it seems like I missed you. Sorry about that |
|
Thanks, nevermind! |
This supersedes #2317. @ckosmowski did an amazing job, I only polished it a bit and fixed the merge conflicts.
@ckosmowski let me know if you don't agree with some of my changes.
Fixes #1075
Open points: