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

@ListenerList changes the ArrayList classnode generics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0-beta-2, 1.8.6
    • 2.0-beta-3, 1.8.7
    • None
    • None

    Description

      The @ListenerList AST transformation changes the generic types associated to the cached ArrayList class node. This is wrong because it has side effects on the subsequent compîlations.

      This

      def listenerListType = ClassHelper.make(ArrayList)
      listenerListType.setGenericsTypes(types)
      

      must be replaced with:

      def listenerListType = ClassHelper.make(ArrayList).plainNodeReference
      listenerListType.setGenericsTypes(types)
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: