Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21036

Infinite cycle in ParametedType.isAssignableTo()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.1.Beta1
    • 4.3.0.Final
    • cdi
    • None

      java.lang.StackOverflowError is reported in
      http://stackoverflow.com/questions/33301776/an-internal-error-occurred-during-jboss-tools-project-validator

      Infinitely cycling calls are
      org.jboss.tools.common.java.ParametedType.isAssignableTo(ParametedType.java:398) at org.jboss.tools.common.java.ParametedType.isAssignableTo(ParametedType.java:402) at org.jboss.tools.common.java.ParametedType.areTypeParametersAssignableTo(ParametedType.java:430)

      Sample that reproduces the stack trace:

      public class B {
      	
      	static class A1<V extends A1<V>> {		
      	}
      
      	static class A2<T extends A2<T>> extends A1<A2<T>> {
      	}
      	
      	static class A3 extends A2<A3> {
      	}
      
      	@Inject
      	A1<A2<A3>> q;
      }
      

      One more infinite cycle in ParametedType.equals():
      at org.jboss.tools.common.java.ParametedType.equals(ParametedType.java:171)
      can be reproduced with sample:

      public class A<V extends A.B<V>>  {
      
      	static class B<V1 extends A.B<V1>> {  
      	}
      
      	@Inject
      	A.B<V> s2; 
      }
       

            scabanovich Viacheslav Kabanovich (Inactive)
            scabanovich Viacheslav Kabanovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: