openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.29k stars 341 forks source link

StackOverflowError in isWellFormedType #2488

Open moderne-meeseeks[bot] opened 2 years ago

moderne-meeseeks[bot] commented 2 years ago

Example diff

        /* empty */
}

-    public static class SampleGenericType<T extends ArrayList<T> & Callable<T>,
+    public static class /*~~(Recipe failed with an exception.
+java.lang.StackOverflowError: null
+  java.base/java.util.HashMap.putVal(HashMap.java:627)
+  java.base/java.util.HashMap.put(HashMap.java:610)
+  java.base/java.util.HashSet.add(HashSet.java:221)
+  org.openrewrite.java.tree.TypeUtils.isWellFormedType(TypeUtils.java:388)
+  org.openrewrite.java.tree.TypeUtils.isWellFormedType(TypeUtils.java:381)
+  org.openrewrite.java.tree.TypeUtils.isWellFormedType(TypeUtils.java:391)
+  org.openrewrite.java.tree.TypeUtils.lambda$isWellFormedType$4(TypeUtils.java:397)
+  java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
+  ...)~~>*/SampleGenericType<T extends ArrayList<T> & Callable<T>,
      S extends Callable<?>,
      U extends Callable<? extends Callable<U>>,
      V extends ArrayList<? super ArrayList<V>>,

Recipes in example diff:

References:


This issue originally created by @jkschneider on: https://github.com/moderneinc/support-public/issues/7

moderne-meeseeks[bot] commented 2 years ago
image

This comment originially written by @jkschneider on: https://github.com/moderneinc/support-public/issues/7#issuecomment-1275976022

moderne-meeseeks[bot] commented 2 years ago

needs to be transferred to rewrite? @sambsnyd


This comment originially written by @okundzich on: https://github.com/moderneinc/support-public/issues/7#issuecomment-1331019746

sambsnyd commented 2 years ago

Yes this is a rewrite issue