Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The use of `JavaTypeVisitor` in `JavaTemplateJavaExtension` is what caused the `StackOverflowError`, as the `JavaType` graphs can contain cycles and don't provide any mechanism to guard against that. While I understand the reason for using a `JavaTypeVisitor` to also correct the references to that type in the graph, it won't fix all references in any case, so it seems a bit futile. Until OpenRewrite provides a mechanism to "globally" update a type attribution, I feel like the best option here is to do what other recipes typically do: Just update the reference at hand. The other alternative here would be to use the internal method `unsafeSet()`. - Fixes: #4161 Co-authored-by: Tim te Beek <tim@moderne.io>
- Loading branch information