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

Default retention policy not implemented for annotation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.6
    • Fix Version/s: 3.0.0-beta-1, 2.5.7
    • Component/s: Compiler
    • Labels:
      None

      Description

      Consider the following:
      Anno.java

      public @interface Anno {}
      

      Pogo.groovy

      @Anno public class Pogo {}
      

      Pojo.java

      @Anno public class Pojo {}
      

      When compiled, Pogo lacks the annotation in its class file.

      // Compiled from Pogo.groovy (version 1.8 : 52.0, super bit)
      public class Pogo implements groovy.lang.GroovyObject {
      

      vs.

      // Compiled from Pojo.java (version 1.8 : 52.0, super bit)
      @Anno
      public class Pojo {
      

      The default for an annotation that lacks an @Retention annotation is @Retention(RetentionPolicy.CLASS).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                paulk Paul King
                Reporter:
                emilles Eric Milles
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m