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

groovyc allows multiple annotations of the same type on the same element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.5
    • 1.6.6, 1.7-rc-1
    • Compiler
    • None

    Description

      Try this in Groovy Console:

      // class compiles fine
      @Deprecated
      @Deprecated
      @Deprecated
      class IAmWayTooDeprecated {}
      
      // this works
      new IAmWayTooDeprecated()
      
      // but accessing the annotations at runtime fails with:
      // java.lang.annotation.AnnotationFormatError: Duplicate 
      // annotation for class: interface java.lang.Deprecated: 
      // @java.lang.Deprecated()
      println IAmWayTooDeprecated.annotations.size() 
      

      Attachments

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              pniederw Peter Niederwieser
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: