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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: