[
https://issues.apache.org/jira/browse/GROOVY-8166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018197#comment-16018197
]
ASF GitHub Bot commented on GROOVY-8166:
----------------------------------------
GitHub user jwagenleitner opened a pull request:
https://github.com/apache/groovy/pull/543
GROOVY-8166: Repeated operations in AnnotationCollectorTransform and …
…Traits
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jwagenleitner/groovy 8166
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/543.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #543
----
commit 72c01601d4cdd00622e6215b2a8d8dcac2ca4a89
Author: John Wagenleitner <[email protected]>
Date: 2017-05-19T19:48:53Z
GROOVY-8166: Repeated operations in AnnotationCollectorTransform and Traits
----
> Repeated operations in AnnotationCollectorTransform and Traits
> --------------------------------------------------------------
>
> Key: GROOVY-8166
> URL: https://issues.apache.org/jira/browse/GROOVY-8166
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Priority: Minor
>
> I think there are a couple bits of redundant code that I have run into
> looking at some stuff related to traits and type checking.
> 1) In {{org.codehaus.groovy.transform.trait.Traits.isTrait(ClassNode)}}, the
> check for the Trait annotation appears redundant to the call to
> {{isAnnotatedWithTrait}}.
> 2) In
> {{org.codehaus.groovy.transform.AnnotationCollectorTransform.makeListOfAnnotations(Object[][])}},
> the recent addition of {{copyMembers}} appears to have missed removing the
> following line {{toAdd.getMembers().putAll(generated);}}. Thus I think the
> map {{generated}} is being asked to put the same entries twice.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)