Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8166

Repeated operations in AnnotationCollectorTransform and Traits

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.12
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jwagenleitner John Wagenleitner
                Reporter:
                emilles Eric Milles
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: