Comments (2)
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 {
}
from rewrite.
Thanks for the clear example @Jnb1234 ! It seems to fail on this particular line
Is there any reason why the types might be absent in your case above? Are those imports on the classpath?
from rewrite.
Related Issues (20)
- `AddManagedDependency` should allow version placeholder properties HOT 7
- org.openrewrite.gradle.RemoveDependency does not remove dependency in subproject HOT 3
- Performance issue with classpath scanning HOT 2
- Openrewrite: apply recipe list step by step (to have a proper commit history) HOT 1
- Support parsing `module-info.java` HOT 44
- Problem with parsing groovy files HOT 1
- RenameVariable does not modify variables referenced through type casts HOT 5
- Groovy Parser Failes on Method Reference Operator :: HOT 3
- Allow custom YAML filenames in YamlParser HOT 4
- There were problems parsing Inner Class HOT 1
- GroovyParser issue with statically imported constants HOT 2
- GroovyParser issue with variable assignment using Map HOT 3
- org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods ignores class level @SuppressWarnings("unused")
- Gradle Plugin/Openrewrite should skip files anntoated with javax.annotation.Generated HOT 3
- 🐛 null is not an object (evaluating 'u.upgradesAndMigrations.map') HOT 2
- MavenPomDownloader - UncheckedIOException does not get wrapped into MavenDownloadingException HOT 1
- XPathMatcher doesn't find the path in the XML document if searched with tag attribute and hence changeTagValue recipe doesn't work as expected. HOT 2
- Option to enable recipes to leave a comment indicating auto-generated code HOT 3
- Expand getCoordinates of newClass to access arguments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rewrite.