rewrite
rewrite copied to clipboard
Automated mass refactoring of source code.
To reproduce run `org.openrewrite.FindParseFailures` on: Java 8 Parser: - PaperMC/Velocity - hivemq/hivemq-community-edition Java 11 Parser: - jdbi/jdbi - FabricMC/fabric-loom Java 17 Parser: - moderneinc/moderne-ast-write
This is a failing test example ```java @Test void annotationAfterType() { rewriteRun( java( """ import org.openrewrite.internal.lang.Nullable; interface JavaType { abstract class FullyQualified implements org.openrewrite.java.tree.JavaType { } } public class A...
Parsing Java files with OR parsers is slower than JDT. The primary reason for this seems to be resolution of all types by OR parsers while JDT doesn't resolve types...
This is a corner case and also rather unlikely to be seen in the wild, but when a constant is replaced with `null` the value may require an explicit type...
See: https://github.com/openrewrite/rewrite/blob/09ba3895ee40d1f25c16b57f0cebfcf797bfb441/rewrite-core/src/main/java/org/openrewrite/marker/Marker.java#L28-L36 And, try to write a class implementing this interface *without* using Lombok for the `withId` implementation. It might look like this: ```java class MyMarker implements Marker { @Override...
## What is the smallest, simplest way to reproduce the problem? ```java @Test void switchCase() { rewriteRun( java( """ public class A { Object reproduce() { Object object = new...
## What problem are you trying to solve? In my company we operate an internal Maven repository which sometimes contains "weird" versions of artifacts (this is probably not limited to...
I have noticed several warnings lately when updating various projects related to repositories not being available or not up to date. As far as I can see, it's usually dependencies...
…the resolution result. This allows for partial success when processing poms which are invalid or contain unresolvable dependencies without hiding the existence of these problems. ## What's changed? ## What's...
## What problem are you trying to solve? Consider a small pom like this: ```xml 4.0.0 org.sample sample 1.0.0 ``` Observe the indentation (four spaces) of line 3. If you...