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

Using referenced String constant as value of Annotation causes compile error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-rc-1
    • 3.0.0-alpha-4, 2.5.4
    • Compiler
    • None
    • OSX 10.5.6
      JDK 1.6

    Description

      When using a String constant as the value for an annotation groovyc errors out with the following message:

      Attribute 'value' should have type java.lang.String but found type java.lang.Object in @SpringBean

      I've attached sample code to reproduce. The annotation and PersonDao are regular Java classes, just as was my case when finding the bug. The PersonAction is a Groovy class.

      Attachments

        1. groovy2827_qualified_annotation_constants.patch
          11 kB
          paulk_asert
        2. src.zip
          0.9 kB
          Gregg Bolinger

        Issue Links

          Activity

            People

              paulk Paul King
              gdboling Gregg Bolinger
              Votes:
              15 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: