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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.3
    • 1.8.4, 2.0-beta-1
    • None
    • None

    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
      
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            aclement Andy Clement
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: