openrewrite / rewrite

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

StackOverflowError in isWellFormedType #2488

Open moderne-meeseeks[bot] opened 1 year ago

moderne-meeseeks[bot] commented 1 year 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 1 year ago
image

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

moderne-meeseeks[bot] commented 1 year 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 1 year ago

Yes this is a rewrite issue