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

Using referenced String constant as value of Annotation causes compile error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-rc-1
    • Fix Version/s: 3.0.0-alpha-4, 2.5.4
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      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. src.zip
          0.9 kB
          Gregg Bolinger
        2. groovy2827_qualified_annotation_constants.patch
          11 kB
          paulk_asert

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                gdboling Gregg Bolinger
              • Votes:
                15 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: