Groovy
  1. Groovy
  2. GROOVY-5374

@TypeChecked does not recognize @Log annotation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-3
    • Component/s: None
    • Labels:
      None

      Description

      @TypeChecked rejects code that uses the @Log annotation. It should not.

      This code does not compile but should:

      import groovy.util.logging.Log
      import groovy.transform.TypeChecked
      
      @Log
      class Example1 {
      
          @TypeChecked
          void method(String message) {
            log.info(message)
          }
      }
      

        Activity

        Hamlet D'Arcy created issue -
        Cédric Champeau made changes -
        Field Original Value New Value
        Assignee Cedric Champeau [ melix ]
        Hide
        Cédric Champeau added a comment -

        Fix should come soon. Actually, the problem is in the various @Log transformations, which do not create class nodes the proper way.

        Show
        Cédric Champeau added a comment - Fix should come soon. Actually, the problem is in the various @Log transformations, which do not create class nodes the proper way.
        Hide
        Cédric Champeau added a comment -

        Fixed by changing the way the various @Log transforms load the class nodes.

        See https://github.com/groovy/groovy-core/commit/e547a7c31904b0dc6af9e1a6f53c429c5007e37c

        Show
        Cédric Champeau added a comment - Fixed by changing the way the various @Log transforms load the class nodes. See https://github.com/groovy/groovy-core/commit/e547a7c31904b0dc6af9e1a6f53c429c5007e37c
        Cédric Champeau made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 2.0-beta-3 [ 18244 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Steven Swor added a comment -

        The fixes for this issue don't appear to have made it into the groovy-all-2.0.5.jar in maven central. Were they overwritten somewhere along the way?

        Show
        Steven Swor added a comment - The fixes for this issue don't appear to have made it into the groovy-all-2.0.5.jar in maven central. Were they overwritten somewhere along the way?
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734297 ] Default workflow, editable Closed status [ 12745963 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971678 ] Default workflow, editable Closed status [ 12979487 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2h 21m 1 Cédric Champeau 20/Mar/12 06:50
        Resolved Resolved Closed Closed
        53d 20h 39m 1 Paul King 13/May/12 04:30

          People

          • Assignee:
            Cédric Champeau
            Reporter:
            Hamlet D'Arcy
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development