[#1140] adds warning when the target has no target properties#3595
Conversation
- warning that no actual target properties are targeted/written to should be given when compiling
processor/src/main/java/org/mapstruct/ap/internal/model/BeanMappingMethod.java
Outdated
Show resolved
Hide resolved
filiphr
left a comment
There was a problem hiding this comment.
Thanks for your work on this @zyberzebra. I've left some comments.
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
processor/src/test/java/org/mapstruct/ap/test/bugs/_1140/AirplaneWithNoAccessors.java
Outdated
Show resolved
Hide resolved
processor/src/test/java/org/mapstruct/ap/test/bugs/_1140/JarMapperTest.java
Outdated
Show resolved
Hide resolved
|
@filiphr I'm not 100% what the correct workflow is. Should I request reviews when I'm ready or not? |
|
The workflow is me trying to get time and going through all the emails and updated PRs 😀. I usually go through PRs that have been updated as well |
Thanks for the clarification ! I just scrolled through some other pull request here and saw that some request reviews and because it's my first time working open source I was unsure. ;) |
|
@filiphr Sorry for the ping. Just thought I give you a ping, because my PRs are probably way down on the pile now. With more time passing, it gets harder for me to remember what we fixed. Which is not a problem, put it might take longer to for me to respond if you come around for a review. :) |
filiphr
left a comment
There was a problem hiding this comment.
Sorry for the waiting @zyberzebra. I've done another pass here. Have a look at my comments
processor/src/main/java/org/mapstruct/ap/internal/util/Message.java
Outdated
Show resolved
Hide resolved
processor/src/test/java/org/mapstruct/ap/test/emptytarget/JarMapperTest.java
Outdated
Show resolved
Hide resolved
processor/src/test/java/org/mapstruct/ap/test/emptytarget/JarMapperTest.java
Outdated
Show resolved
Hide resolved
- remove method name - assert that line is reported on warning
filiphr
left a comment
There was a problem hiding this comment.
Good work @zyberzebra. I've done some small polishing and added a test case for the comment I left.
Have a look at it and let me know what you think
processor/src/main/java/org/mapstruct/ap/internal/model/BeanMappingMethod.java
Outdated
Show resolved
Hide resolved
- the check needs to be after constructor parameters were evaluated - otherwise we would produce incorrect warning if the constructor is used for setting target properties
Fixes: #1140
TODO: