rewrite-migrate-java
rewrite-migrate-java copied to clipboard
OpenRewrite recipes for migrating to newer versions of Java.
Safely expand SequencedCollection `getFirst/Last` to also convert lists returned from method calls
The recipe at https://docs.openrewrite.org/recipes/java/migrate/util/sequencedcollection can recognize a match where a simple index value is used ```diff - TokenAdaptor tokenAdaptor = cachedTokens.get(0); + TokenAdaptor tokenAdaptor = cachedTokens.getFirst(); ``` but it misses...
## What problem are you trying to solve? Folks using `com.something.Record` through `import com.something.*;` might find that the `java.lang.Record` is picked up when they migrate to Java 16+. Same for...
## What version of OpenRewrite are you using? I am using - 5.39.2 - 2.17.1 - 1.15.0 - 2.23.0 - 1.8.4 ## How are you running OpenRewrite? I am using...
Fix #692: Replace "java.faces" in Java file strings
## What's changed? Added mapping for joda LocalDate to java LocalDate ## Anyone you would like to review specifically? @amishra-u @timtebeek Recipe is still not updating the field as it...
## What version of OpenRewrite are you using? Latest 3.4.0 ## What is the smallest, simplest way to reproduce the problem? ```java @Test public void useVarBug() { rewriteRun( spec ->...
I ran ```sh mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \ -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE \ -Drewrite.activeRecipes=org.openrewrite.java.migrate.jakarta.JakartaEE10 ``` and found that the composite component facet name was not replaced. ```java container.getFacet("javax.faces.component.COMPOSITE_FACET_NAME") ``` Maybe this is too much...
We are using Payara 6.2025.2 (bundled with EclipseLink). After migration the application does not start with this exception: ``` java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 201; columnNumber: 24; Deployment descriptor file META-INF/persistence.xml in...
## What's changed? Adds recipe that renames "effective getter methods" to the way lombok would name them. ## What's your motivation? When a team starts without lombok, their getter and...
## What's changed? ## What's your motivation? ## Anything in particular you'd like reviewers to focus on? ## Anyone you would like to review specifically? ## Have you considered any...