-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Groovy parser fails when using duplicate static star imports #4068
Comments
Thanks for the clear example @Jnb1234 ! It seems to fail on this particular line rewrite/rewrite-groovy/src/main/java/org/openrewrite/groovy/GroovyParserVisitor.java Line 232 in 06a1bc8
Is there any reason why the types might be absent in your case above? Are those imports on the classpath? |
They are on the classpath. If you comment one of the imports the parsing issue goes away. Edited... You may be correct about the classpath. Let me try again in the demo project... I changed the import as it was an internal import.... I will update as with a better example. Though I am not sure how it would compile if not on the classpath. The following compiles with no parsing issues so it is on the classpath I think. package openrewrite.issues
import static org.mockito.Mockito.*
// import static org.mockito.Mockito.*
class DuplicateImport {
}
// Also note the following works.
package openrewrite.issues
import static org.mockito.Mockito.any
import static org.mockito.Mockito.any
class DuplicateImport {
} |
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Gradle plugin, and my project is a single module project.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
No parsing error
What did you see instead?
parsing error
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
The text was updated successfully, but these errors were encountered: