#1797 Use EnumSet.noneOf when creating a new instance of EnumSet#1806
Merged
Conversation
chris922
reviewed
May 4, 2019
Contributor
|
From the top of my head.. isn't there a list of interfaces and respective implementations in Typefactory?
Verstuurd vanaf mijn iPhone
… Op 4 mei 2019 om 18:45 heeft Filip Hrisafov ***@***.***> het volgende geschreven:
@filiphr commented on this pull request.
In processor/src/main/java/org/mapstruct/ap/internal/model/IterableCreation.java:
> return types;
}
+
+ public Type getEnumSetElementType() {
+ return first( getResultType().determineTypeArguments( Iterable.class ) );
+ }
+
+ public boolean isEnumSet() {
+ return "java.util.EnumSet".equals( resultType.getFullyQualifiedName() );
I copied this from SetterWrapperForCollectionsAndMapsWithNullCheck.
We could do it like your suggestion as well, not big difference I think. I doubt that the EnumSet will change it's package anytime soon 😄
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Member
Author
Yes, there is an |
Member
Author
Contributor
|
No. No need 😉.
Verstuurd vanaf mijn iPhone
…
|
chris922
approved these changes
May 5, 2019
chris922
left a comment
Member
There was a problem hiding this comment.
Yes, just go on. Thanks for the fix!
Member
Author
|
Thanks for the review @chris922 |
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.
Fixes #1797