groovy
  1. groovy
  2. GROOVY-5374

@TypeChecked does not recognize @Log annotation

    Details

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

      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

        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 -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0-beta-3 [ 18244 ]
        Resolution Fixed [ 1 ]
        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?

          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: