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

Class with @CompileStatic, @Immutable, and a List property causes a compiler exception to be thrown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.3
    • 2.1.4
    • Static compilation
    • None
    • Windows 7, Java 6, 64-bit, Groovy 2.1.3

    Description

      When compiling the following class the groovy compiler throws an exception. In addition, when compiling multiple classes there is no indication which class caused the exception (making it hard to find).

      @groovy.transform.CompileStatic
      @groovy.transform.Immutable
      class MyClass {
          List<String> myList
      }
      
      java.lang.ArrayIndexOutOfBoundsException: size==0
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            bborchardt Brett Borchardt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: