#3943: Allow generation of methods with a sole argument of primitive type#3944
Open
anenviousguest wants to merge 2 commits intomapstruct:mainfrom
Open
#3943: Allow generation of methods with a sole argument of primitive type#3944anenviousguest wants to merge 2 commits intomapstruct:mainfrom
anenviousguest wants to merge 2 commits intomapstruct:mainfrom
Conversation
# Conflicts: # processor/src/main/java/org/mapstruct/ap/internal/processor/MethodRetrievalProcessor.java
Author
|
Hi @filiphr, any chance to get a feedback on this one? Thank you. |
Member
|
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. |
Member
|
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.