groovy
  1. groovy
  2. GROOVY-5112

"A transform used a generics containing ClassNode" error messages for @Delegate

    Details

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

      Description

      I had a quick look but didn't see this already raised. This program:

      class ListWrapper {  
        @Delegate
        List myList
        
        @Delegate
        URL homepage
      }
      

      causes this error:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      Code.groovy: -1: A transform used a generics containing ClassNode java.lang.Class <T extends java.lang.Object -> java.lang.Object> for the method public final java.lang.Object getContent([Ljava.lang.Class; param0) throws java.io.IOException { ... } directly. You are not suppposed to do this. Please create a new ClassNode refering to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.
       @ line -1, column -1.
      1 error
      
      

        Activity

        CÚdric Champeau made changes -
        Field Original Value New Value
        Assignee Cedric Champeau [ melix ]
        Hide
        CÚdric Champeau added a comment -

        The issue was related to a class node which didn't use generics but was an array type which component did use generics. Fixed on master and 1.8.x.

        Show
        CÚdric Champeau added a comment - The issue was related to a class node which didn't use generics but was an array type which component did use generics. Fixed on master and 1.8.x.
        CÚdric Champeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.9-beta-5 [ 17925 ]
        Fix Version/s 1.8.4 [ 17852 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            Andy Clement
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: