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

Infinite recursion in genericTypeAsString

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-beta-2
    • Fix Version/s: 2.4.7
    • Component/s: None
    • Labels:
    • Environment:
      Groovy Version: 2.4.6 JVM: 1.8.0_91 Vendor: Oracle Corporation OS: Linux

      Description

      The following two Java classes C1 and C2 cause Groovy to enter infinite recursion in genericTypeAsString when a method that takes a C1 is declared:

      C1.java:

      public class C1 <T2 extends C2<T2,T1>,T1 extends C1<T2,T1>> { }
      class C2<T2 extends C2<T2, T1>, T1 extends C1<T2, T1>> { }
      

      repro.groovy

      def f(C1 c1) { }
      

      This is reduced from actual code in Jenkins, where Run and Job have type parameters like this.

        Attachments

        1. groovy-7826.zip
          0.8 kB
          Magnus Reftel

          Activity

            People

            • Assignee:
              pascalschumacher Pascal Schumacher
              Reporter:
              magnus.reftel Magnus Reftel
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: