groovy

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.5
  • Fix Version/s: 1.6.6, 1.7-rc-1
  • Component/s: Compiler
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

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()

Issue Links

Activity

Hide
Roshan Dawrani added a comment -

Fixed

Show
Roshan Dawrani added a comment - Fixed

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: