#3943: Allow generation of methods with a sole argument of primitive type#3944
#3943: Allow generation of methods with a sole argument of primitive type#3944anenviousguest wants to merge 9 commits intomapstruct:mainfrom
Conversation
# Conflicts: # processor/src/main/java/org/mapstruct/ap/internal/processor/MethodRetrievalProcessor.java
|
Hi @filiphr, any chance to get a feedback on this one? Thank you. |
|
As you can see I've been quite busy with a lot of stuff. I kept postponing 1.7, so I wanted to do a first Beta release for it, before going deeper into other PRs. I'll get to this one. |
|
One thing I would say is that if we are going to allow this, then we need to do it more proactively. It works if the target has a property named the same as the source value. However, if that's not the case, then we would treat the primitive as a bean. Therefore, I think that we need to do some adjustments in the i.e. Can you add a test case where the target does not have a property matching the source? |
|
@filiphr it's been a while, apologies. I added a couple of extra tests, also the one which illustrates compilation failure with unmapped property - if that's what you've meant. |
Took a stab at fixing #3943.
Not quite sure what was the reason for explicitly forbidding such methods back then, given that it works perfectly fine - at least as far as the test below is concerned.