-
Notifications
You must be signed in to change notification settings - Fork 119
Comparing changes
Open a pull request
base repository: openrewrite/rewrite-migrate-java
base: v3.31.3
head repository: openrewrite/rewrite-migrate-java
compare: v3.32.0
- 16 commits
- 57 files changed
- 5 contributors
Commits on Mar 31, 2026
-
Cap Java version at 24 for Kotlin <2.3 in UpgradeToJava25 (#1035)
* Cap Java version at 24 for Kotlin <2.3 in UpgradeToJava25 (#2126) Kotlin versions before 2.3 only support up to Java 24. When running UpgradeToJava25 on projects with kotlin-stdlib <2.3, the Java version is now set to 24 instead of 25. * Use ModuleHasDependency invertMarking instead of custom ScanningRecipe Replace HasNoOldKotlinDependency with ModuleHasDependency's invertMarking option for detecting projects without Kotlin <2.3. * Inline Kotlin version check recipes into UpgradeToJava25 Remove the intermediate UpgradeBuildToJava25 wrapper and reference UpgradeBuildToJava24ForOldKotlin and UpgradeBuildToJava25Default directly from UpgradeToJava25. * Rename UpgradeBuildToJava25Default to UpgradeBuildToJava25 * Rename UpgradeBuildToJava24ForOldKotlin to UpgradeBuildToJava24
Configuration menu - View commit details
-
Copy full SHA for 926ea39 - Browse repository at this point
Copy the full SHA 926ea39View commit details -
Inline JavaTemplate fields at their usage sites (#1036)
Remove stored JavaTemplate fields in favor of inline builder chains, matching the recommended pattern used throughout the rest of the codebase.
Configuration menu - View commit details
-
Copy full SHA for dd77a80 - Browse repository at this point
Copy the full SHA dd77a80View commit details -
Use
JavaTemplate.apply()static method (#1037)Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.UseJavaTemplateStaticApply?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41cc6b9 - Browse repository at this point
Copy the full SHA 41cc6b9View commit details
Commits on Apr 2, 2026
-
Fix ClassCastException in UseVarForGenericMethodInvocations (#1039)
Add instanceof check before casting to J.ParameterizedType in makeNestedGenericsExplicit(). The code assumed all NewClass clazz nodes are ParameterizedType, but they can also be J.Identifier (e.g., `new String(...)`) or J.FieldAccess (e.g., `new java.lang.String(...)`).
Configuration menu - View commit details
-
Copy full SHA for ff0c329 - Browse repository at this point
Copy the full SHA ff0c329View commit details -
Upgrade Mockito to 5.17.x in Java 25 migration recipe (#1041)
Mockito's inline mock maker relies on Byte Buddy, but versions before 5.17.0 bundle a Byte Buddy that only supports classfile version 66 (Java 22). Java 25 emits classfile version 69, causing Byte Buddy to abort instrumentation and Mockito to fail with "cannot mock this class". Mockito 5.17.0+ bundles Byte Buddy 1.17.6+ which supports Java 25.
Configuration menu - View commit details
-
Copy full SHA for ed7df0d - Browse repository at this point
Copy the full SHA ed7df0dView commit details -
Migrate Mojarra and Glassfish JSF dependencies to Jakarta Faces (#1040)
* Migrate Mojarra (com.sun.faces) and Glassfish JSF dependencies to Jakarta Faces The JSF 2.x to Jakarta Faces migration recipes only handled javax.faces:javax.faces-api, missing the widely-used Mojarra (com.sun.faces:jsf-api, com.sun.faces:jsf-impl) and Glassfish (org.glassfish:javax.faces) artifacts. This caused ClassCastException at runtime when upgrading to Spring 6 because the JSF runtime stayed on javax.el while Spring 6 uses jakarta.el. Adds ChangeDependency rules for com.sun.faces and org.glassfish:javax.faces in the Faces 3.x migration, and UpgradeDependencyVersion for org.glassfish:jakarta.faces in the Faces 4.x migration. Fixes moderneinc/customer-requests#2160 * Use assertThat(...).actual() style assertions in UpdateJakartaFacesApiTest
Configuration menu - View commit details
-
Copy full SHA for 2c285d5 - Browse repository at this point
Copy the full SHA 2c285d5View commit details -
Upgrade jakarta.annotation-api to 3.0.x in Jakarta EE 11 recipe (#1042)
* Upgrade jakarta.annotation-api to 3.0.x in Jakarta EE 11 recipe The UpdateJakartaPlatform11 recipe was missing the version upgrade for jakarta.annotation:jakarta.annotation-api to 3.0.x, which is the version specified by the Jakarta EE 11 platform BOM. Jakarta EE 10 already upgrades to 2.1.x via MigrationToJakarta10Apis. Also adds tests for JavaxAnnotationMigrationToJakartaAnnotation covering both the explicit dependency migration and the no-explicit-dependency scenarios. * Use .actual() on assertion chain in annotation migration test * Use .actual() on remaining assertion chain in annotation migration test
Configuration menu - View commit details
-
Copy full SHA for 276316d - Browse repository at this point
Copy the full SHA 276316dView commit details -
Move type-use annotations to array brackets during JSpecify migration (…
…#1038) * Move type-use annotations to array brackets during JSpecify migration (#934) * Run MoveAnnotationToArrayType before ChangeType to preserve semantics Move the recipe before ChangeType in each migration pipeline so it matches on the old annotation type (e.g. javax.annotation.*). This avoids incorrectly moving pre-existing JSpecify annotations where @nullable String[] intentionally means "array of nullable Strings." * Add test: pre-existing JSpecify array-of-nullable-elements is not affected Verifies that a project with both javax annotations (to migrate) and pre-existing JSpecify @nullable String[] (meaning array of nullable elements) only migrates the javax annotations without touching the already-correct JSpecify annotations. * Fix copyright year, use import, and early returns in MoveAnnotationToArrayType * Narrow annotation type patterns to *ull* to match only nullability annotations * Replace AtomicReference with find-then-remove using equality check * Use ListUtils.map result equality check instead of stream * Remove AtomicReference and redundant test * Capture match from ListUtils.map lambda, drop separate for loop * Update generated recipes.csv * Add test for nested class array type annotation movement * Skip MoveAnnotationToArrayType for TYPE_USE annotations Jakarta, JetBrains, and Micronaut annotations target TYPE_USE, so `@Nullable X[]` (element nullable) already has distinct semantics from `X @nullable[]` (array nullable). Moving them would change meaning.
Configuration menu - View commit details
-
Copy full SHA for 9e138a7 - Browse repository at this point
Copy the full SHA 9e138a7View commit details
Commits on Apr 6, 2026
-
OpenRewrite recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 407e3dd - Browse repository at this point
Copy the full SHA 407e3ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41373e1 - Browse repository at this point
Copy the full SHA 41373e1View commit details -
Add explicit casts for visitor visit() return type (#1049)
* Add explicit casts for visitor `visit()` return type The `visit()` method on OpenRewrite visitors now returns `J` rather than the specific subtype. Add explicit casts at affected call sites: - `RefineSwitchCases` — cast to `J.Switch` - `IfElseIfConstructToSwitch` — cast to `J.Switch` - `LombokValueToRecord` — cast to `J.ClassDeclaration` - `RemoveEmbeddableId` — cast to `J.ClassDeclaration` Also fix `MoveAnnotationToArrayType` missing `@Nullable` import by adding `org.jspecify.annotations.Nullable` and adjusting type-use annotation placement. * Revert @nullable annotation changes in MoveAnnotationToArrayType * Add missing @nullable import in MoveAnnotationToArrayType * Avoid constructor calls in RemovedModifierAndConstantBootstrapsConstructors test The core ChangeMethodTargetToStatic recipe now matches constructor calls with the wildcard pattern, incorrectly converting `new Modifier()` to `Modifier.Modifier()`. Pass instances as parameters instead to avoid triggering the constructor matching.
Configuration menu - View commit details
-
Copy full SHA for 9e118a4 - Browse repository at this point
Copy the full SHA 9e118a4View commit details
Commits on Apr 7, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 2a56971 - Browse repository at this point
Copy the full SHA 2a56971View commit details -
Replace Collections.emptyXXX with Immutable Static Factory Methods (#…
…1045) * Replace Collections.emptyXXX with Immutable Static Factory Methods Closes #1044 * Add Java 9+ precondition and use JavaTemplate for Collections.emptyXXX recipes * Add all util recipes to JavaUtilAPIs and reference it from best practices * Fix ReplaceMathRandomWithThreadLocalRandom recipe class name --------- Co-authored-by: Tim te Beek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 96d6dd9 - Browse repository at this point
Copy the full SHA 96d6dd9View commit details
Commits on Apr 8, 2026
-
OpenRewrite recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 55f801a - Browse repository at this point
Copy the full SHA 55f801aView commit details -
Fix
AddMissingMethodImplementationgenerating stubs for inherited m…Configuration menu - View commit details
-
Copy full SHA for fecaa2e - Browse repository at this point
Copy the full SHA fecaa2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2388f91 - Browse repository at this point
Copy the full SHA 2388f91View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.31.3...v3.32.0