Open jimbethancourt opened 1 month ago
Thanks for the report @jimbethancourt ! it looks to be failing on a visitYield
inside visitSwitchExpression
. Now we do have tests around the usage of yield
, as seen here and in the same file:
https://github.com/openrewrite/rewrite/blob/e1c09ab2dbb07f99d813e1908e6df75900ea9256/rewrite-java-tck/src/main/java/org/openrewrite/java/tree/SwitchExpressionTest.java#L96-L115
The question then is what kind of pattern was used here, and whether we can turn that into a new unit test and ultimately parser fix. Any additional details you can provide would be helpful!
I'll reach out to the user and ask them to enable debugging
What version of OpenRewrite are you using?
I am using the org.openrewrite.recipe:rewrite-recipe-bom:3.4.0 BOM in RefactorFirst. A user reported the stacktrace below. Unfortunately I don't have any context about the line of code that was encountered that led to the issue. Thankfully the parser continued parsing.
How are you running OpenRewrite?
I am calling the OpenRewrite Java parser from the RefactorFirst codebase-graph-builder module.
What is the smallest, simplest way to reproduce the problem?
Unfortunately I'm not sure, but hopefully the stacktrace below will help.
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
Possibly