From d9affcf809e7b7a8c9742952c7178649e075294b Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:41:05 +0100 Subject: [PATCH 1/7] Fix typos in recipe display names and descriptions Covers `@Slf4` for `@Slf4j`, a stray quote after `@Inject`, embedded newlines in `AddColumnAnnotation`, `EnumSet of(..)`, `List.Of(..)`, an unclosed backtick and made-up `Optional#or` signature, garbled `RemoveFinalizerFromZip` text and doubled spaces. --- .../openrewrite/java/migrate/ChangeDefaultKeyStore.java | 2 +- .../java/migrate/JREThrowableFinalMethods.java | 2 +- .../java/migrate/RemovedSecurityManagerMethods.java | 2 +- .../java/migrate/ReplaceComSunAWTUtilitiesMethods.java | 2 +- .../migrate/guava/PreferJavaUtilOptionalOrSupplier.java | 4 ++-- .../java/migrate/jakarta/UpdateAddAnnotatedTypes.java | 2 +- .../java/migrate/javax/AddColumnAnnotation.java | 8 ++++---- .../openrewrite/java/migrate/javax/AddJaxwsRuntime.java | 4 ++-- .../java/migrate/javax/AddScopeToInjectedClass.java | 2 +- .../java/migrate/lombok/log/UseLogRecipeTemplate.java | 2 +- .../org/openrewrite/java/migrate/lombok/log/UseSlf4j.java | 4 ++-- .../migrate/util/MigrateCollectionsUnmodifiableList.java | 2 +- .../migrate/util/MigrateCollectionsUnmodifiableSet.java | 2 +- .../java/migrate/util/RemoveFinalizerFromZip.java | 4 ++-- .../org/openrewrite/java/migrate/util/UseEnumSetOf.java | 4 ++-- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java index 379d012ea6..2ddff72037 100644 --- a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java +++ b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java @@ -35,7 +35,7 @@ public class ChangeDefaultKeyStore extends Recipe { private static final MethodMatcher KEYSTORE_METHOD_REF = new MethodMatcher("java.security.KeyStore getDefaultType()"); @Getter - final String displayName = "Return String `jks` when `KeyStore.getDefaultType()` is called"; + final String displayName = "Return String `jks` when `KeyStore.getDefaultType()` is called"; @Getter final String description = "In Java 11 the default keystore was updated from JKS to PKCS12. " + diff --git a/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java b/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java index 4f71b12e00..7fe9997f28 100644 --- a/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java @@ -52,7 +52,7 @@ public JREThrowableFinalMethods( final String displayName = "Rename final method declarations `getSuppressed()` and `addSuppressed(Throwable exception)` in classes that extend `Throwable`"; @Getter - final String description = "The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes " + + final String description = "The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes " + "that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. " + "These methods were added to Throwable in Java 7 and are marked final which cannot be overridden."; diff --git a/src/main/java/org/openrewrite/java/migrate/RemovedSecurityManagerMethods.java b/src/main/java/org/openrewrite/java/migrate/RemovedSecurityManagerMethods.java index 8ee2212071..3c1e3372a6 100644 --- a/src/main/java/org/openrewrite/java/migrate/RemovedSecurityManagerMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/RemovedSecurityManagerMethods.java @@ -33,7 +33,7 @@ public class RemovedSecurityManagerMethods extends Recipe { private static final MethodMatcher METHOD_PATTERN_WINDOW = new MethodMatcher("java.lang.SecurityManager checkTopLevelWindow(..)", false); @Getter - final String displayName = "Replace deprecated methods in`SecurityManager`"; + final String displayName = "Replace deprecated methods in `SecurityManager`"; @Getter final String description = "Replace `SecurityManager` methods `checkAwtEventQueueAccess()`, `checkSystemClipboardAccess()`, " + diff --git a/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java b/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java index 02b6c6e801..f018627185 100644 --- a/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java @@ -104,7 +104,7 @@ public ReplaceComSunAWTUtilitiesMethods( String displayName = "Replace `com.sun.awt.AWTUtilities` static method invocations"; - String description = "This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. " + + String description = "This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. " + "The methods replaced are `AWTUtilities.isTranslucencySupported()`, `AWTUtilities.setWindowOpacity()`, `AWTUtilities.getWindowOpacity()`, " + "`AWTUtilities.getWindowShape()`, `AWTUtilities.isWindowOpaque()`, `AWTUtilities.isTranslucencyCapable()` and `AWTUtilities.setComponentMixingCutoutShape()`."; diff --git a/src/main/java/org/openrewrite/java/migrate/guava/PreferJavaUtilOptionalOrSupplier.java b/src/main/java/org/openrewrite/java/migrate/guava/PreferJavaUtilOptionalOrSupplier.java index 1b01b50662..bd40c794a0 100644 --- a/src/main/java/org/openrewrite/java/migrate/guava/PreferJavaUtilOptionalOrSupplier.java +++ b/src/main/java/org/openrewrite/java/migrate/guava/PreferJavaUtilOptionalOrSupplier.java @@ -38,9 +38,9 @@ public class PreferJavaUtilOptionalOrSupplier extends Recipe { static final MethodMatcher METHOD_MATCHER = new MethodMatcher("com.google.common.base.Optional or(com.google.common.base.Optional)"); - String displayName = "Prefer `java.util.Optional#or(Supplier>)`"; + String displayName = "Prefer `java.util.Optional#or(Supplier>)`"; - String description = "Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional)."; + String description = "Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional)`."; Set tags = new HashSet<>( Arrays.asList( "RSPEC-S4738", "guava" ) ); diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAddAnnotatedTypes.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAddAnnotatedTypes.java index 6027706e66..d1d28c7662 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAddAnnotatedTypes.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAddAnnotatedTypes.java @@ -34,7 +34,7 @@ public class UpdateAddAnnotatedTypes extends Recipe { final String displayName = "Replace `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` with `addAnnotatedType(AnnotatedType, String)`"; @Getter - final String description = "`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is Replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`."; + final String description = "`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java b/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java index 4d10f62ceb..fdcc899a26 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java @@ -37,10 +37,10 @@ public class AddColumnAnnotation extends Recipe { String displayName = "`@ElementCollection` annotations must be accompanied by a defined `@Column` annotation"; - String description = "When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute \n" + - "ID and value. In OpenJPA, the column for the annotated attribute is named element, whereas EclipseLink names the column based on \n" + - "the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a `@Column` annotation with the name \n" + - "attribute set to element."; + String description = "When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute " + + "ID and value. In OpenJPA, the column for the annotated attribute is named `element`, whereas EclipseLink names the column based on " + + "the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a `@Column` annotation with the `name` " + + "attribute set to `element`."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java index 777783317f..6d7868feed 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxwsRuntime.java @@ -77,7 +77,7 @@ public static class AddJaxwsRuntimeGradle extends Recipe { String displayName = "Use the latest JAX-WS API and runtime for Jakarta EE 8"; String description = "Update Gradle build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility " + - "with Java version 11 or greater. The recipe will add a JAX-WS run-time, in " + + "with Java version 11 or greater. The recipe will add a JAX-WS run-time, in " + "`compileOnly`+`testImplementation` configurations, to any project that has a transitive dependency " + "on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move " + "to the Jakarta artifact**."; @@ -172,7 +172,7 @@ public static class AddJaxwsRuntimeMaven extends Recipe { String displayName = "Use the latest JAX-WS API and runtime for Jakarta EE 8"; String description = "Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility " + - "with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project " + + "with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project " + "that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` " + "namespace, despite the move to the Jakarta artifact**."; diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddScopeToInjectedClass.java b/src/main/java/org/openrewrite/java/migrate/javax/AddScopeToInjectedClass.java index 7298d67d6e..6e4a9f5371 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddScopeToInjectedClass.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddScopeToInjectedClass.java @@ -36,7 +36,7 @@ public class AddScopeToInjectedClass extends ScanningRecipe> { final String displayName = "Add scope annotation to injected classes"; @Getter - final String description = "Finds member variables annotated with `@Inject' and applies `@Dependent` scope annotation to the variable's type."; + final String description = "Finds member variables annotated with `@Inject` and applies `@Dependent` scope annotation to the variable's type."; @Override public Set getInitialValue(ExecutionContext ctx) { diff --git a/src/main/java/org/openrewrite/java/migrate/lombok/log/UseLogRecipeTemplate.java b/src/main/java/org/openrewrite/java/migrate/lombok/log/UseLogRecipeTemplate.java index 4e6b8a02ee..1355677a6b 100644 --- a/src/main/java/org/openrewrite/java/migrate/lombok/log/UseLogRecipeTemplate.java +++ b/src/main/java/org/openrewrite/java/migrate/lombok/log/UseLogRecipeTemplate.java @@ -28,7 +28,7 @@ protected String getDisplayName(String annotation) { protected String getDescription(String annotation, String pathToLogger) { //language=markdown - return String.format("Prefer the lombok annotation `%s` over explicitly written out `%s` fields.", annotation, pathToLogger); + return String.format("Prefer the Lombok annotation `%s` over explicitly written out `%s` fields.", annotation, pathToLogger); } } diff --git a/src/main/java/org/openrewrite/java/migrate/lombok/log/UseSlf4j.java b/src/main/java/org/openrewrite/java/migrate/lombok/log/UseSlf4j.java index c53a6607cb..8b0d1ae802 100644 --- a/src/main/java/org/openrewrite/java/migrate/lombok/log/UseSlf4j.java +++ b/src/main/java/org/openrewrite/java/migrate/lombok/log/UseSlf4j.java @@ -28,12 +28,12 @@ public class UseSlf4j extends UseLogRecipeTemplate { @Override public String getDisplayName() { - return getDisplayName("@Slf4"); + return getDisplayName("@Slf4j"); } @Override public String getDescription() { - return getDescription("@Slf4", "org.slf4j.Logger"); + return getDescription("@Slf4j", "org.slf4j.Logger"); } @Option(displayName = "Name of the log field", diff --git a/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableList.java b/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableList.java index 4539289c7b..1f43884618 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableList.java +++ b/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableList.java @@ -39,7 +39,7 @@ public class MigrateCollectionsUnmodifiableList extends Recipe { final String displayName = "Prefer `List.of(..)`"; @Getter - final String description = "Prefer `List.Of(..)` instead of using `unmodifiableList(java.util.Arrays asList())` in Java 9 or higher."; + final String description = "Prefer `List.of(..)` instead of using `Collections.unmodifiableList(Arrays.asList(..))` in Java 9 or higher."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableSet.java b/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableSet.java index c96765a289..371b83c561 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableSet.java +++ b/src/main/java/org/openrewrite/java/migrate/util/MigrateCollectionsUnmodifiableSet.java @@ -41,7 +41,7 @@ public class MigrateCollectionsUnmodifiableSet extends Recipe { final String displayName = "Prefer `Set.of(..)`"; @Getter - final String description = "Prefer `Set.Of(..)` instead of using `unmodifiableSet(java.util.Set(java.util.Arrays asList()))` in Java 9 or higher."; + final String description = "Prefer `Set.of(..)` instead of using `Collections.unmodifiableSet(new HashSet<>(Arrays.asList(..)))` in Java 9 or higher."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/util/RemoveFinalizerFromZip.java b/src/main/java/org/openrewrite/java/migrate/util/RemoveFinalizerFromZip.java index ba7a15be70..c561bf675c 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/RemoveFinalizerFromZip.java +++ b/src/main/java/org/openrewrite/java/migrate/util/RemoveFinalizerFromZip.java @@ -43,9 +43,9 @@ public class RemoveFinalizerFromZip extends Recipe { private static final MethodMatcher METHOD_MATCHER = new MethodMatcher("java.lang.Object finalize()"); - String displayName = "Remove invocations of deprecated invocations from Deflater, Inflater, ZipFile "; + String displayName = "Remove `finalize()` invocations on `Deflater`, `Inflater` and `ZipFile`"; - String description = "Remove invocations of finalize() deprecated invocations from Deflater, Inflater, ZipFile."; + String description = "Remove invocations of the deprecated `finalize()` method on `Deflater`, `Inflater` and `ZipFile`."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/util/UseEnumSetOf.java b/src/main/java/org/openrewrite/java/migrate/util/UseEnumSetOf.java index 4089a6290b..5d447c36a6 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/UseEnumSetOf.java +++ b/src/main/java/org/openrewrite/java/migrate/util/UseEnumSetOf.java @@ -48,9 +48,9 @@ public class UseEnumSetOf extends Recipe { @Nullable Boolean convertEmptySet; - String displayName = "Prefer `EnumSet of(..)`"; + String displayName = "Prefer `EnumSet.of(..)`"; - String description = "Prefer `EnumSet of(..)` instead of using `Set of(..)` when the arguments are enums in Java 9 or higher."; + String description = "Prefer `EnumSet.of(..)` instead of using `Set.of(..)` when the arguments are enums in Java 9 or higher."; Duration estimatedEffortPerOccurrence = Duration.ofMinutes( 2 ); From cba7de2a8d6c1992e24007181a40bae0a62a886b Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:41:34 +0100 Subject: [PATCH 2/7] Use sentence case and verb-first recipe display names Display names now start with the action the recipe takes, rather than stating a rule such as "`@Entity` objects with constructors must also have a default constructor", and only capitalize proper nouns and product names such as SDKMAN!. --- .../org/openrewrite/java/migrate/AddJDeprScanPlugin.java | 2 +- .../java/migrate/AddMissingMethodImplementation.java | 4 ++-- .../migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java | 2 +- .../migrate/AddStaticVariableOnProducerSessionBean.java | 2 +- .../AddSuppressionForIllegalReflectionWarningsPlugin.java | 4 ++-- .../java/migrate/AddSurefireFailsafeArgLine.java | 2 +- .../java/org/openrewrite/java/migrate/BeanDiscovery.java | 2 +- .../openrewrite/java/migrate/ChangeDefaultKeyStore.java | 2 +- .../java/org/openrewrite/java/migrate/MXBeanRule.java | 2 +- .../java/org/openrewrite/java/migrate/UpdateSdkMan.java | 8 ++++---- .../openrewrite/java/migrate/guava/NoGuavaRefaster.java | 6 +++--- .../java/migrate/jakarta/UpdateGetRealPath.java | 2 +- .../java/migrate/javax/AddColumnAnnotation.java | 2 +- .../migrate/javax/AddDefaultConstructorToEntityClass.java | 2 +- .../openrewrite/java/migrate/javax/AddTableGenerator.java | 2 +- .../javax/AddTransientAnnotationToCollections.java | 2 +- .../migrate/javax/AddTransientAnnotationToEntity.java | 2 +- .../javax/AddTransientAnnotationToPrivateAccessor.java | 2 +- .../java/migrate/javax/RemoveEmbeddableId.java | 2 +- .../java/migrate/javax/UseJoinColumnForMapping.java | 2 +- .../java/migrate/lang/IfElseIfConstructToSwitch.java | 2 +- .../lang/SwitchCaseAssignmentsToSwitchExpression.java | 2 +- .../migrate/lang/var/UseVarForGenericsConstructors.java | 2 +- .../java/migrate/lombok/LombokValueToRecord.java | 4 ++-- .../java/migrate/util/OptionalStreamRecipe.java | 2 +- 25 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java b/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java index 7e9509841b..89dc0bc261 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java @@ -38,7 +38,7 @@ public class AddJDeprScanPlugin extends Recipe { private final String release; @Getter - final String displayName = "Add `JDeprScan` Maven Plug-in"; + final String displayName = "Add `JDeprScan` Maven plugin"; @Getter final String description = "Add the `JDeprScan` Maven plugin to scan class files for uses of deprecated APIs."; diff --git a/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java b/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java index ab4f702f04..1a02ec6c12 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java @@ -50,9 +50,9 @@ public class AddMissingMethodImplementation extends Recipe { example = "public String hello() { return \\\"Hello from #{}!\\\"; }") String methodTemplateString; - String displayName = "Adds missing method implementations"; + String displayName = "Add missing method implementations"; - String description = "Check for missing methods required by interfaces and adds them."; + String description = "Add a method to classes that implement the given interface but are missing the method."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java index 3411e16569..595cae1f34 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMockitoJavaAgentToMavenSurefirePlugin.java @@ -58,7 +58,7 @@ public class AddMockitoJavaAgentToMavenSurefirePlugin extends Recipe { "get-mockito-agent-path" + PROPERTIES_GOAL + ""; @Getter - final String displayName = "Add Mockito Java Agent to Maven Surefire Plugin"; + final String displayName = "Add Mockito Java agent to Maven Surefire plugin"; @Getter final String description = "Mockito attaches its Byte Buddy agent to the running JVM at test time, which the JDK has " + diff --git a/src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java b/src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java index 020f64a908..96d6dec6ba 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java +++ b/src/main/java/org/openrewrite/java/migrate/AddStaticVariableOnProducerSessionBean.java @@ -38,7 +38,7 @@ public class AddStaticVariableOnProducerSessionBean extends ScanningRecipe getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java b/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java index d0f06c29c1..8e3d96ce56 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java +++ b/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java @@ -41,7 +41,7 @@ public class AddSurefireFailsafeArgLine extends Recipe { example = "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED") String argLine; - String displayName = "Add `argLine` to surefire and failsafe plugins"; + String displayName = "Add `argLine` to Maven Surefire and Failsafe plugins"; String description = "Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, " + "merging with any existing argLine value without duplicating arguments. " + diff --git a/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java b/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java index 7194902b85..e0827a5276 100644 --- a/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java +++ b/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java @@ -35,7 +35,7 @@ public class BeanDiscovery extends Recipe { private static final XPathMatcher BEANS_MATCHER = new XPathMatcher("/beans"); private static final Pattern VERSION_PATTERN = Pattern.compile("_([^\\/\\.]+)\\.xsd"); - String displayName = "Behavior change to bean discovery in modules with `beans.xml` file with no version specified"; + String displayName = "Add `version` and `bean-discovery-mode` to `beans.xml` files without a version"; String description = "Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode=\"all\" attribute to maintain an explicit bean archive."; diff --git a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java index 2ddff72037..c0bc40c2ed 100644 --- a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java +++ b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java @@ -35,7 +35,7 @@ public class ChangeDefaultKeyStore extends Recipe { private static final MethodMatcher KEYSTORE_METHOD_REF = new MethodMatcher("java.security.KeyStore getDefaultType()"); @Getter - final String displayName = "Return String `jks` when `KeyStore.getDefaultType()` is called"; + final String displayName = "Replace `KeyStore.getDefaultType()` with `\"jks\"`"; @Getter final String description = "In Java 11 the default keystore was updated from JKS to PKCS12. " + diff --git a/src/main/java/org/openrewrite/java/migrate/MXBeanRule.java b/src/main/java/org/openrewrite/java/migrate/MXBeanRule.java index 11cf0bba09..540e658505 100644 --- a/src/main/java/org/openrewrite/java/migrate/MXBeanRule.java +++ b/src/main/java/org/openrewrite/java/migrate/MXBeanRule.java @@ -45,7 +45,7 @@ @Value public class MXBeanRule extends Recipe { - String displayName = "MBean and MXBean interfaces must be public"; + String displayName = "Make MBean and MXBean interfaces public"; String description = "Sets visibility of MBean and MXBean interfaces to public."; diff --git a/src/main/java/org/openrewrite/java/migrate/UpdateSdkMan.java b/src/main/java/org/openrewrite/java/migrate/UpdateSdkMan.java index 9f30faacc7..40ccc645f8 100644 --- a/src/main/java/org/openrewrite/java/migrate/UpdateSdkMan.java +++ b/src/main/java/org/openrewrite/java/migrate/UpdateSdkMan.java @@ -63,12 +63,12 @@ public class UpdateSdkMan extends Recipe { @Nullable String newDistribution; - String displayName = "Update SDKMan Java version"; + String displayName = "Update SDKMAN! Java version"; - String description = "Update the SDKMAN JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe " + - "will update the current distribution to the current default SDKMAN version of the specified major " + + String description = "Update the SDKMAN! JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe " + + "will update the current distribution to the current default SDKMAN! version of the specified major " + "release. The distribution option can be used to specify a specific JVM distribution. " + - "Note that these must correspond to valid SDKMAN distributions."; + "Note that these must correspond to valid SDKMAN! distributions."; @Override public Validated validate(ExecutionContext ctx) { diff --git a/src/main/java/org/openrewrite/java/migrate/guava/NoGuavaRefaster.java b/src/main/java/org/openrewrite/java/migrate/guava/NoGuavaRefaster.java index 697c22f14d..2f1fcf1aa0 100644 --- a/src/main/java/org/openrewrite/java/migrate/guava/NoGuavaRefaster.java +++ b/src/main/java/org/openrewrite/java/migrate/guava/NoGuavaRefaster.java @@ -49,7 +49,7 @@ public class NoGuavaRefaster { @RecipeDescriptor( - name = "`Preconditions.checkNotNull` to `Objects.requireNonNull`", + name = "Replace `Preconditions.checkNotNull` with `Objects.requireNonNull`", description = "Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`." ) public static class PreconditionsCheckNotNullToObjectsRequireNonNull { @@ -67,7 +67,7 @@ Object after(Object object) { // Note: Order of the below two recipes are important. @RecipeDescriptor( - name = "`Preconditions.checkNotNull` with `String` message to `Objects.requireNonNull`", + name = "Replace `Preconditions.checkNotNull` taking a `String` message with `Objects.requireNonNull`", description = "Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`." ) public static class PreconditionsCheckNotNullWithMessageToObjectsRequireNonNull { @@ -84,7 +84,7 @@ Object after(Object object, String message) { } @RecipeDescriptor( - name = "`Preconditions.checkNotNull` with `Object` message to `Objects.requireNonNull` with `String.valueOf`", + name = "Replace `Preconditions.checkNotNull` taking an `Object` message with `Objects.requireNonNull` and `String.valueOf`", description = "Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`." ) public static class PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObject { diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java index 577717e46d..9d35a8d111 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java @@ -31,7 +31,7 @@ public class UpdateGetRealPath extends Recipe { private static final MethodMatcher GET_REAL_PATH = new MethodMatcher("jakarta.servlet.ServletRequest* getRealPath(String)", false); @Getter - final String displayName = "Updates `getRealPath()` to call `getContext()` followed by `getRealPath()`"; + final String displayName = "Replace `ServletRequest.getRealPath(String)` with `getServletContext().getRealPath(String)`"; @Getter final String description = "Updates `getRealPath()` for `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` to use `ServletContext.getRealPath(String)`."; diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java b/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java index fdcc899a26..874c17b3c0 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddColumnAnnotation.java @@ -35,7 +35,7 @@ @Value public class AddColumnAnnotation extends Recipe { - String displayName = "`@ElementCollection` annotations must be accompanied by a defined `@Column` annotation"; + String displayName = "Set `@Column(name = \"element\")` on `@ElementCollection` attributes"; String description = "When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute " + "ID and value. In OpenJPA, the column for the annotated attribute is named `element`, whereas EclipseLink names the column based on " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddDefaultConstructorToEntityClass.java b/src/main/java/org/openrewrite/java/migrate/javax/AddDefaultConstructorToEntityClass.java index 290c7da490..ce9e1e9c80 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddDefaultConstructorToEntityClass.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddDefaultConstructorToEntityClass.java @@ -27,7 +27,7 @@ @EqualsAndHashCode(callSuper = false) public class AddDefaultConstructorToEntityClass extends Recipe { @Getter - final String displayName = "`@Entity` objects with constructors must also have a default constructor"; + final String displayName = "Add a default constructor to `@Entity` and `@MappedSuperclass` classes"; @Getter final String description = "When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddTableGenerator.java b/src/main/java/org/openrewrite/java/migrate/javax/AddTableGenerator.java index 0498d2c40f..4ad369e092 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddTableGenerator.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddTableGenerator.java @@ -36,7 +36,7 @@ @EqualsAndHashCode(callSuper = false) @Value public class AddTableGenerator extends Recipe { - String displayName = "Attributes with automatically generated values require configuration"; + String displayName = "Add a `@TableGenerator` to automatically generated `@GeneratedValue` attributes"; String description = "Adds missing `@TableGenerator` annotation and updates the `@GeneratedValue` annotation values when it uses automatically generated values."; diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToCollections.java b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToCollections.java index 937da74e62..daf07a4df5 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToCollections.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToCollections.java @@ -34,7 +34,7 @@ @Value public class AddTransientAnnotationToCollections extends Recipe { - String displayName = "Unannotated collection attributes require a Transient annotation"; + String displayName = "Add `@Transient` to unannotated collection attributes"; String description = "In OpenJPA, attributes that inherit from the `java.util.Collection` interface are not a default " + "persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToEntity.java b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToEntity.java index 78e3883faa..9194d9de90 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToEntity.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToEntity.java @@ -39,7 +39,7 @@ @Value public class AddTransientAnnotationToEntity extends ScanningRecipe { - String displayName = "Unannotated entity attributes require a Transient annotation"; + String displayName = "Add `@Transient` to unannotated entity attributes"; String description = "In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has " + "a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToPrivateAccessor.java b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToPrivateAccessor.java index f3154609f5..b01f7fb08a 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToPrivateAccessor.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddTransientAnnotationToPrivateAccessor.java @@ -38,7 +38,7 @@ @Value public class AddTransientAnnotationToPrivateAccessor extends Recipe { - String displayName = "Private accessor methods must have a `@Transient` annotation"; + String displayName = "Add `@Transient` to private accessor methods"; String description = "According to the JPA 2.1 specification, when property access is used, the property accessor methods " + "must be public or protected. OpenJPA ignores any private accessor methods, whereas EclipseLink persists " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/RemoveEmbeddableId.java b/src/main/java/org/openrewrite/java/migrate/javax/RemoveEmbeddableId.java index 4b60190604..06b3af89aa 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/RemoveEmbeddableId.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/RemoveEmbeddableId.java @@ -35,7 +35,7 @@ public class RemoveEmbeddableId extends ScanningRecipe { @Getter - final String displayName = "`@Embeddable` classes cannot have an `@Id` annotation when referenced by an `@EmbeddedId` annotation"; + final String displayName = "Remove `@Id` from `@Embeddable` classes referenced by an `@EmbeddedId`"; @Getter final String description = "According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an " + diff --git a/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java b/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java index 76611d38b4..9b6e60d5f2 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java @@ -34,7 +34,7 @@ public class UseJoinColumnForMapping extends Recipe { private final String COLUMN = "javax.persistence.Column"; @Getter - final String displayName = "`@JoinColumn` annotations must be used with relationship mappings"; + final String displayName = "Replace `@Column` with `@JoinColumn` on relationship mappings"; @Getter final String description = "In OpenJPA, when a relationship attribute has either a `@OneToOne` or a `@ManyToOne` annotation with a " + diff --git a/src/main/java/org/openrewrite/java/migrate/lang/IfElseIfConstructToSwitch.java b/src/main/java/org/openrewrite/java/migrate/lang/IfElseIfConstructToSwitch.java index 462dc8e29e..7fddec0ebc 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/IfElseIfConstructToSwitch.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/IfElseIfConstructToSwitch.java @@ -50,7 +50,7 @@ @EqualsAndHashCode(callSuper = false) @Value public class IfElseIfConstructToSwitch extends Recipe { - String displayName = "If-else-if-else to switch"; + String displayName = "Replace if-else-if-else with switch"; String description = "Replace if-else-if-else with switch statements. In order to be replaced with a switch, " + "all conditions must be on the same variable and there must be at least three cases."; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/SwitchCaseAssignmentsToSwitchExpression.java b/src/main/java/org/openrewrite/java/migrate/lang/SwitchCaseAssignmentsToSwitchExpression.java index 5d76a70914..5a77d6dab1 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/SwitchCaseAssignmentsToSwitchExpression.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/SwitchCaseAssignmentsToSwitchExpression.java @@ -40,7 +40,7 @@ @Value @EqualsAndHashCode(callSuper = false) public class SwitchCaseAssignmentsToSwitchExpression extends Recipe { - String displayName = "Convert assigning Switch statements to Switch expressions"; + String displayName = "Convert assigning switch statements to switch expressions"; String description = "Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. " + "This recipe is only applicable for Java 21 and later."; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericsConstructors.java b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericsConstructors.java index 5573da2810..210d514517 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericsConstructors.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericsConstructors.java @@ -34,7 +34,7 @@ public class UseVarForGenericsConstructors extends Recipe { @Getter - final String displayName = "Apply `var` to Generic Constructors"; + final String displayName = "Apply `var` to generic constructors"; @Getter final String description = "Apply `var` to generics variables initialized by constructor calls."; diff --git a/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java b/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java index 58677715b9..f9446b650b 100644 --- a/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java +++ b/src/main/java/org/openrewrite/java/migrate/lombok/LombokValueToRecord.java @@ -52,9 +52,9 @@ public class LombokValueToRecord extends ScanningRecipe> @Nullable Boolean useExactToString; - String displayName = "Convert `@lombok.Value` class to Record"; + String displayName = "Convert `@lombok.Value` class to record"; - String description = "Convert Lombok `@Value` annotated classes to standard Java Records."; + String description = "Convert Lombok `@Value` annotated classes to standard Java records."; Set tags = singleton( "lombok" ); diff --git a/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java b/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java index 1a7ee6b317..d217197f0c 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java +++ b/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java @@ -32,7 +32,7 @@ public class OptionalStreamRecipe extends Recipe { @Getter - final String displayName = "`Stream` idiom recipe"; + final String displayName = "Replace `filter(Optional::isPresent).map(Optional::get)` with `flatMap(Optional::stream)`"; @Getter final String description = "Migrate Java 8 `Optional.filter(Optional::isPresent).map(Optional::get)` to Java 11 `.flatMap(Optional::stream)`."; From a4b2e9f2be7dcf7d7e9b5c7d51eb5de2decf246c Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:42:49 +0100 Subject: [PATCH 3/7] Wrap code identifiers in recipe texts in backticks Method calls, types, file names, Maven plugins and Docker images in display names and descriptions now render as code, as elsewhere. --- .../java/migrate/AddSurefireFailsafeArgLine.java | 6 +++--- .../java/org/openrewrite/java/migrate/BeanDiscovery.java | 2 +- .../org/openrewrite/java/migrate/ChangeDefaultKeyStore.java | 2 +- ...IllegalArgumentExceptionToAlreadyConnectedException.java | 2 +- .../openrewrite/java/migrate/JREThrowableFinalMethods.java | 2 +- .../java/migrate/MigrateGraalVMResourceConfig.java | 4 ++-- .../java/migrate/SimplifySecurityManagerThreadGroup.java | 2 +- .../openrewrite/java/migrate/UpgradeDockerImageVersion.java | 4 ++-- .../java/migrate/UpgradeJavaCiContainerImage.java | 2 +- .../org/openrewrite/java/migrate/UpgradeJavaVersion.java | 4 ++-- .../java/migrate/UpgradeUnmodeledMavenJavaVersion.java | 2 +- .../java/migrate/jakarta/AddJakartaXmlBindRuntime.java | 4 ++-- .../migrate/jakarta/InvocationContextGetConstructor.java | 4 ++-- .../migrate/jakarta/RetainJaxbApiForArquillianRecorder.java | 2 +- .../java/migrate/jakarta/UpdateManagedBeanToNamed.java | 2 +- .../migrate/jakarta/UpgradeMavenEjbPluginConfiguration.java | 2 +- .../migrate/lang/ReplaceUnusedVariablesWithUnderscore.java | 2 +- .../java/migrate/search/FindInternalJavaxApis.java | 2 +- .../java/migrate/table/JavaVersionMigrationPlan.java | 4 ++-- .../util/ReplaceMathRandomWithThreadLocalRandom.java | 4 ++-- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java b/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java index 8e3d96ce56..edba38700c 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java +++ b/src/main/java/org/openrewrite/java/migrate/AddSurefireFailsafeArgLine.java @@ -36,15 +36,15 @@ public class AddSurefireFailsafeArgLine extends Recipe { @Option(displayName = "Arg line", - description = "The arguments to add to the surefire and failsafe plugin `argLine` configuration. " + - "Individual arguments are space-separated. Arguments already present in the existing argLine are not duplicated.", + description = "The arguments to add to the Maven Surefire and Failsafe plugin `argLine` configuration. " + + "Individual arguments are space-separated. Arguments already present in the existing `argLine` are not duplicated.", example = "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED") String argLine; String displayName = "Add `argLine` to Maven Surefire and Failsafe plugins"; String description = "Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, " + - "merging with any existing argLine value without duplicating arguments. " + + "merging with any existing `argLine` value without duplicating arguments. " + "The `@{argLine}` [late property reference](https://maven.apache.org/surefire/maven-surefire-plugin/faq.html) is prepended " + "so that an agent injected by another plugin during the build, such as the JaCoCo coverage agent from " + "`jacoco-maven-plugin:prepare-agent`, is preserved rather than overwritten. It is not added when the existing " + diff --git a/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java b/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java index e0827a5276..42f8130992 100644 --- a/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java +++ b/src/main/java/org/openrewrite/java/migrate/BeanDiscovery.java @@ -37,7 +37,7 @@ public class BeanDiscovery extends Recipe { String displayName = "Add `version` and `bean-discovery-mode` to `beans.xml` files without a version"; - String description = "Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode=\"all\" attribute to maintain an explicit bean archive."; + String description = "Alters `beans.xml` files with a missing `version` attribute to include this attribute as well as `bean-discovery-mode=\"all\"`, to maintain an explicit bean archive."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java index c0bc40c2ed..9af1e3ca8a 100644 --- a/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java +++ b/src/main/java/org/openrewrite/java/migrate/ChangeDefaultKeyStore.java @@ -39,7 +39,7 @@ public class ChangeDefaultKeyStore extends Recipe { @Getter final String description = "In Java 11 the default keystore was updated from JKS to PKCS12. " + - "As a result, applications relying on KeyStore.getDefaultType() may encounter issues after migrating, " + + "As a result, applications relying on `KeyStore.getDefaultType()` may encounter issues after migrating, " + "unless their JKS keystore has been converted to PKCS12. " + "This recipe returns default key store of `jks` when `KeyStore.getDefaultType()` method is called to " + "use the pre Java 11 default keystore."; diff --git a/src/main/java/org/openrewrite/java/migrate/IllegalArgumentExceptionToAlreadyConnectedException.java b/src/main/java/org/openrewrite/java/migrate/IllegalArgumentExceptionToAlreadyConnectedException.java index b91682737c..eb6af56fa7 100644 --- a/src/main/java/org/openrewrite/java/migrate/IllegalArgumentExceptionToAlreadyConnectedException.java +++ b/src/main/java/org/openrewrite/java/migrate/IllegalArgumentExceptionToAlreadyConnectedException.java @@ -37,7 +37,7 @@ public class IllegalArgumentExceptionToAlreadyConnectedException extends Recipe final String displayName = "Replace `IllegalArgumentException` with `AlreadyConnectedException` in `DatagramChannel.send()` method"; @Getter - final String description = "Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+."; + final String description = "Replace `IllegalArgumentException` with `AlreadyConnectedException` for `DatagramChannel.send()` to ensure compatibility with Java 11+."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java b/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java index 7fe9997f28..a1fa93bef3 100644 --- a/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/JREThrowableFinalMethods.java @@ -54,7 +54,7 @@ public JREThrowableFinalMethods( @Getter final String description = "The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes " + "that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. " + - "These methods were added to Throwable in Java 7 and are marked final which cannot be overridden."; + "These methods were added to `Throwable` in Java 7 and are marked final which cannot be overridden."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/MigrateGraalVMResourceConfig.java b/src/main/java/org/openrewrite/java/migrate/MigrateGraalVMResourceConfig.java index 3d31fb3d8a..baf9034481 100644 --- a/src/main/java/org/openrewrite/java/migrate/MigrateGraalVMResourceConfig.java +++ b/src/main/java/org/openrewrite/java/migrate/MigrateGraalVMResourceConfig.java @@ -60,9 +60,9 @@ @EqualsAndHashCode(callSuper = false) public class MigrateGraalVMResourceConfig extends Recipe { - String displayName = "Migrate GraalVM resource-config.json to glob patterns"; + String displayName = "Migrate GraalVM `resource-config.json` to glob patterns"; - String description = "Migrates GraalVM native-image resource-config.json files from the legacy regex pattern format " + + String description = "Migrates GraalVM `native-image` `resource-config.json` files from the legacy regex pattern format " + "(JDK 21 and earlier) to the new glob pattern format (JDK 23+). " + "Converts `pattern` entries to `glob` entries and restructures the format. " + "Note: `excludes` are no longer supported in the new format and will be removed."; diff --git a/src/main/java/org/openrewrite/java/migrate/SimplifySecurityManagerThreadGroup.java b/src/main/java/org/openrewrite/java/migrate/SimplifySecurityManagerThreadGroup.java index a72d1c6d8d..b44c51bb35 100644 --- a/src/main/java/org/openrewrite/java/migrate/SimplifySecurityManagerThreadGroup.java +++ b/src/main/java/org/openrewrite/java/migrate/SimplifySecurityManagerThreadGroup.java @@ -34,7 +34,7 @@ @EqualsAndHashCode(callSuper = false) public class SimplifySecurityManagerThreadGroup extends Recipe { String displayName = "Simplify the removed security manager's thread group fallback"; - String description = "Remove a null SecurityManager local used only by the immediately following thread group conditional."; + String description = "Remove a `null` `SecurityManager` local used only by the immediately following thread group conditional."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/UpgradeDockerImageVersion.java b/src/main/java/org/openrewrite/java/migrate/UpgradeDockerImageVersion.java index 07c39abaeb..740fd018a6 100644 --- a/src/main/java/org/openrewrite/java/migrate/UpgradeDockerImageVersion.java +++ b/src/main/java/org/openrewrite/java/migrate/UpgradeDockerImageVersion.java @@ -60,8 +60,8 @@ public class UpgradeDockerImageVersion extends Recipe { String displayName = "Upgrade Docker image Java version"; String description = "Upgrade Docker image tags to use the specified Java version. " + - "Updates common Java Docker images including eclipse-temurin, amazoncorretto, azul/zulu-openjdk, " + - "and others. Also migrates deprecated images (openjdk, adoptopenjdk) to eclipse-temurin, " + + "Updates common Java Docker images including `eclipse-temurin`, `amazoncorretto`, `azul/zulu-openjdk`, " + + "and others. Also migrates deprecated images (`openjdk`, `adoptopenjdk`) to `eclipse-temurin`, " + "preserving any tag suffix such as `-jre-alpine`. When a `FROM` is built from a build argument, the " + "default value of the corresponding global `ARG` is upgraded instead, such that `ARG java_version=17` " + "used as `FROM eclipse-temurin:${java_version}` becomes `ARG java_version=25`. Image references built " + diff --git a/src/main/java/org/openrewrite/java/migrate/UpgradeJavaCiContainerImage.java b/src/main/java/org/openrewrite/java/migrate/UpgradeJavaCiContainerImage.java index 0108a670e1..aa3f9c5b4e 100644 --- a/src/main/java/org/openrewrite/java/migrate/UpgradeJavaCiContainerImage.java +++ b/src/main/java/org/openrewrite/java/migrate/UpgradeJavaCiContainerImage.java @@ -35,7 +35,7 @@ public class UpgradeJavaCiContainerImage extends Recipe { Integer version; String displayName = "Upgrade CircleCI OpenJDK job images"; - String description = "Upgrade cimg/openjdk job containers in GitHub Actions and CircleCI to the target Java version, " + + String description = "Upgrade `cimg/openjdk` job containers in GitHub Actions and CircleCI to the target Java version, " + "preserving newer versions and unrelated service images."; private static final Pattern IMAGE = Pattern.compile("cimg/openjdk:(\\d+)\\.\\d+(?:\\.\\d+)?(-[a-z0-9-]+)?"); diff --git a/src/main/java/org/openrewrite/java/migrate/UpgradeJavaVersion.java b/src/main/java/org/openrewrite/java/migrate/UpgradeJavaVersion.java index 556d7d32ae..621484a0fe 100644 --- a/src/main/java/org/openrewrite/java/migrate/UpgradeJavaVersion.java +++ b/src/main/java/org/openrewrite/java/migrate/UpgradeJavaVersion.java @@ -43,8 +43,8 @@ public class UpgradeJavaVersion extends Recipe { String displayName = "Upgrade Java version"; String description = "Upgrade build plugin configuration to use the specified Java version. " + - "This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of gradle projects, " + - "or maven-compiler-plugin target version and related settings. " + + "This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of Gradle projects, " + + "or `maven-compiler-plugin` target version and related settings. " + "Will not downgrade if the version is newer than the specified version."; @Override diff --git a/src/main/java/org/openrewrite/java/migrate/UpgradeUnmodeledMavenJavaVersion.java b/src/main/java/org/openrewrite/java/migrate/UpgradeUnmodeledMavenJavaVersion.java index 9827ad3038..360046ed1f 100644 --- a/src/main/java/org/openrewrite/java/migrate/UpgradeUnmodeledMavenJavaVersion.java +++ b/src/main/java/org/openrewrite/java/migrate/UpgradeUnmodeledMavenJavaVersion.java @@ -33,7 +33,7 @@ public class UpgradeUnmodeledMavenJavaVersion extends Recipe { Integer version; String displayName = "Upgrade Java version in alternate Maven builds"; - String description = "Update explicit Java version properties and compiler settings in pom.xml files parsed as XML " + + String description = "Update explicit Java version properties and compiler settings in `pom.xml` files parsed as XML " + "without a Maven model, for example in a repository built with Gradle. Property references are left intact."; @Override diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/AddJakartaXmlBindRuntime.java b/src/main/java/org/openrewrite/java/migrate/jakarta/AddJakartaXmlBindRuntime.java index 2a636355c6..0260584586 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/AddJakartaXmlBindRuntime.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/AddJakartaXmlBindRuntime.java @@ -42,8 +42,8 @@ @EqualsAndHashCode(callSuper = false) public class AddJakartaXmlBindRuntime extends ScanningRecipe { String displayName = "Add a Jakarta JAXB runtime for Maven applications"; - String description = "Add a Jakarta JAXB 3 runtime when a Maven module calls JAXBContext.newInstance and has no " + - "explicit JAXB provider or provided Jakarta platform. Java 8's built-in javax provider cannot serve Jakarta calls. " + + String description = "Add a Jakarta JAXB 3 runtime when a Maven module calls `JAXBContext.newInstance` and has no " + + "explicit JAXB provider or provided Jakarta platform. Java 8's built-in `javax` provider cannot serve Jakarta calls. " + "Annotation-only modules are left alone and test-only calls receive a test dependency."; public static class Accumulator { diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/InvocationContextGetConstructor.java b/src/main/java/org/openrewrite/java/migrate/jakarta/InvocationContextGetConstructor.java index 7a135707d0..5e8989ef48 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/InvocationContextGetConstructor.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/InvocationContextGetConstructor.java @@ -32,10 +32,10 @@ public class InvocationContextGetConstructor extends Recipe { @Getter - final String displayName = "Complete InvocationContext decorators"; + final String displayName = "Complete `InvocationContext` decorators"; @Getter - final String description = "Delegate getConstructor() when a legacy InvocationContext wrapper delegates getMethod()."; + final String description = "Delegate `getConstructor()` when a legacy `InvocationContext` wrapper delegates `getMethod()`."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/RetainJaxbApiForArquillianRecorder.java b/src/main/java/org/openrewrite/java/migrate/jakarta/RetainJaxbApiForArquillianRecorder.java index e62b3fe5b0..e569a71ebd 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/RetainJaxbApiForArquillianRecorder.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/RetainJaxbApiForArquillianRecorder.java @@ -39,7 +39,7 @@ public class RetainJaxbApiForArquillianRecorder extends ScanningRecipe getInitialValue(ExecutionContext ctx) { diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateManagedBeanToNamed.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateManagedBeanToNamed.java index 4909dafc7a..26962d0c50 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateManagedBeanToNamed.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateManagedBeanToNamed.java @@ -40,7 +40,7 @@ public class UpdateManagedBeanToNamed extends Recipe { String displayName = "Update Faces `@ManagedBean` to use CDI `@Named`"; - String description = "Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). " + + String description = "Faces `@ManagedBean` was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). " + "Replace `@ManagedBean` with `@Named` for CDI-based bean management."; Set tags = new HashSet<>( Arrays.asList( "jakarta", "faces", "jsf" ) ); diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpgradeMavenEjbPluginConfiguration.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpgradeMavenEjbPluginConfiguration.java index cf823354ba..a6f71059ee 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpgradeMavenEjbPluginConfiguration.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpgradeMavenEjbPluginConfiguration.java @@ -38,7 +38,7 @@ public class UpgradeMavenEjbPluginConfiguration extends Recipe { - String displayName = "Set `maven-ejb-plugin` ejbVersion to 4.0"; + String displayName = "Set `maven-ejb-plugin` `ejbVersion` to `4.0`"; String description = "Updates the `` configuration of `maven-ejb-plugin` to `4.0` when the current value " + "(or its resolved Maven property) indicates EJB 3.x. Handles the common pattern where `` " + diff --git a/src/main/java/org/openrewrite/java/migrate/lang/ReplaceUnusedVariablesWithUnderscore.java b/src/main/java/org/openrewrite/java/migrate/lang/ReplaceUnusedVariablesWithUnderscore.java index 38bd7b6e7c..15a969eff4 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/ReplaceUnusedVariablesWithUnderscore.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/ReplaceUnusedVariablesWithUnderscore.java @@ -41,7 +41,7 @@ public class ReplaceUnusedVariablesWithUnderscore extends Recipe { String displayName = "Replace unused variables with underscore"; - String description = "Replace unused variable declarations with underscore (_) for Java 22+. " + + String description = "Replace unused variable declarations with underscore (`_`) for Java 22+. " + "This includes unused variables in enhanced for loops, catch blocks, " + "and lambda parameters where the variable is never referenced."; diff --git a/src/main/java/org/openrewrite/java/migrate/search/FindInternalJavaxApis.java b/src/main/java/org/openrewrite/java/migrate/search/FindInternalJavaxApis.java index 4d5860bbfd..093689fa91 100644 --- a/src/main/java/org/openrewrite/java/migrate/search/FindInternalJavaxApis.java +++ b/src/main/java/org/openrewrite/java/migrate/search/FindInternalJavaxApis.java @@ -48,7 +48,7 @@ public class FindInternalJavaxApis extends Recipe { private final String methodPattern; @Getter - final String displayName = "Find uses of internal javax APIs"; + final String displayName = "Find uses of internal `javax` APIs"; @Getter final String description = "The libraries that define these APIs will have to be migrated before any of the repositories that use them."; diff --git a/src/main/java/org/openrewrite/java/migrate/table/JavaVersionMigrationPlan.java b/src/main/java/org/openrewrite/java/migrate/table/JavaVersionMigrationPlan.java index 8c33845109..b26d86772c 100644 --- a/src/main/java/org/openrewrite/java/migrate/table/JavaVersionMigrationPlan.java +++ b/src/main/java/org/openrewrite/java/migrate/table/JavaVersionMigrationPlan.java @@ -55,7 +55,7 @@ public static class Row { String gradleVersion; @Column(displayName = "Has Gradle build", - description = "Whether a build.gradle file exists in the repository.") + description = "Whether a `build.gradle` file exists in the repository.") Boolean hasGradleBuild; @Column(displayName = "Maven version", @@ -63,7 +63,7 @@ public static class Row { String mavenVersion; @Column(displayName = "Has Maven pom", - description = "Whether a pom.xml file exists in the repository.") + description = "Whether a `pom.xml` file exists in the repository.") Boolean hasMavenPom; } } diff --git a/src/main/java/org/openrewrite/java/migrate/util/ReplaceMathRandomWithThreadLocalRandom.java b/src/main/java/org/openrewrite/java/migrate/util/ReplaceMathRandomWithThreadLocalRandom.java index d9808ae0ef..93f4f75528 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/ReplaceMathRandomWithThreadLocalRandom.java +++ b/src/main/java/org/openrewrite/java/migrate/util/ReplaceMathRandomWithThreadLocalRandom.java @@ -22,8 +22,8 @@ import java.util.concurrent.ThreadLocalRandom; @RecipeDescriptor( - name = "Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()`", - description = "Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()` to reduce contention." + name = "Replace `Math.random()` with `ThreadLocalRandom.current().nextDouble()`", + description = "Replace `Math.random()` with `ThreadLocalRandom.current().nextDouble()` to reduce contention." ) public class ReplaceMathRandomWithThreadLocalRandom { @BeforeTemplate From 57e874d04fb1d2afc0d5d9e6c0173267beb54b7f Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:43:27 +0100 Subject: [PATCH 4/7] Correct recipe descriptions that misstate what the recipe does `AddJaxbRuntime` adds the runtime in `runtimeOnly`/`runtime` scope rather than `compileOnly`/`provided`, `ApplicationPathWildcardNoLongerAccepted` strips `/*` rather than a slash, `NoMapsAndSetsWithExpectedSize` emits constructors, `OptionalStreamRecipe` is gated on Java 9, and `ThreadStopUnsupported` also comments on older Java versions. --- .../java/migrate/guava/NoMapsAndSetsWithExpectedSize.java | 4 +++- .../jakarta/ApplicationPathWildcardNoLongerAccepted.java | 2 +- .../java/migrate/jakarta/RemoveBeanIsNullable.java | 4 +++- .../java/migrate/jakarta/UpdateGetRealPath.java | 2 +- .../org/openrewrite/java/migrate/javax/AddJaxbRuntime.java | 2 +- .../org/openrewrite/java/migrate/lang/StringFormatted.java | 2 +- .../java/migrate/lang/ThreadStopUnsupported.java | 7 ++++--- .../lang/var/UseVarForGenericMethodInvocations.java | 3 ++- .../java/migrate/util/OptionalStreamRecipe.java | 2 +- 9 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/guava/NoMapsAndSetsWithExpectedSize.java b/src/main/java/org/openrewrite/java/migrate/guava/NoMapsAndSetsWithExpectedSize.java index e377771b6c..fa374fa6db 100644 --- a/src/main/java/org/openrewrite/java/migrate/guava/NoMapsAndSetsWithExpectedSize.java +++ b/src/main/java/org/openrewrite/java/migrate/guava/NoMapsAndSetsWithExpectedSize.java @@ -39,7 +39,9 @@ public class NoMapsAndSetsWithExpectedSize extends Recipe { final String displayName = "Prefer JDK methods for Maps and Sets of an expected size"; @Getter - final String description = "Prefer Java 19+ methods to create Maps and Sets of an expected size instead of using Guava methods."; + final String description = "Replace Guava's `Maps.newHashMapWithExpectedSize(int)`, `Maps.newLinkedHashMapWithExpectedSize(int)`, " + + "`Sets.newHashSetWithExpectedSize(int)` and `Sets.newLinkedHashSetWithExpectedSize(int)` with the JDK " + + "`HashMap`, `LinkedHashMap`, `HashSet` and `LinkedHashSet` constructors."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/ApplicationPathWildcardNoLongerAccepted.java b/src/main/java/org/openrewrite/java/migrate/jakarta/ApplicationPathWildcardNoLongerAccepted.java index 5ba462aba8..8982fbeab1 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/ApplicationPathWildcardNoLongerAccepted.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/ApplicationPathWildcardNoLongerAccepted.java @@ -31,7 +31,7 @@ public class ApplicationPathWildcardNoLongerAccepted extends Recipe { @Getter - final String displayName = "Remove trailing slash from `jakarta.ws.rs.ApplicationPath` values"; + final String displayName = "Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values"; @Getter final String description = "Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values."; diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/RemoveBeanIsNullable.java b/src/main/java/org/openrewrite/java/migrate/jakarta/RemoveBeanIsNullable.java index 37dca1b6d0..ddfcf0fb17 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/RemoveBeanIsNullable.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/RemoveBeanIsNullable.java @@ -37,7 +37,9 @@ public class RemoveBeanIsNullable extends Recipe { final String displayName = "Remove `Bean.isNullable()`"; @Getter - final String description = "`Bean.isNullable()` has been removed in CDI 4.0.0, and now always returns `false`."; + final String description = "`Bean.isNullable()` was deprecated in CDI 1.1, after which implementations should always return `false`, " + + "and was removed in CDI 4.0. " + + "Replace calls with `false` and simplify the resulting conditionals."; private static final MethodMatcher BEAN_ISNULLABLE = new MethodMatcher("jakarta.enterprise.inject.spi.Bean isNullable()", false); diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java index 9d35a8d111..78d59ae8e2 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateGetRealPath.java @@ -34,7 +34,7 @@ public class UpdateGetRealPath extends Recipe { final String displayName = "Replace `ServletRequest.getRealPath(String)` with `getServletContext().getRealPath(String)`"; @Getter - final String description = "Updates `getRealPath()` for `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` to use `ServletContext.getRealPath(String)`."; + final String description = "Replace the removed `getRealPath(String)` on `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` with `getServletContext().getRealPath(String)`."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java index 3f8dd8f918..c6fd281a8e 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java @@ -65,7 +65,7 @@ public class AddJaxbRuntime extends ScanningRecipe { String description = "Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with " + "Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle " + - "`compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive " + + "`runtimeOnly` and Maven `runtime` scope, to any project that uses `javax.xml.bind` and has a transitive " + "dependency on the JAXB API. **The resulting dependencies still use the `javax` namespace, despite " + "the move to the Jakarta artifact**."; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/StringFormatted.java b/src/main/java/org/openrewrite/java/migrate/lang/StringFormatted.java index cf272d9de9..5f05327de8 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/StringFormatted.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/StringFormatted.java @@ -44,7 +44,7 @@ public class StringFormatted extends Recipe { @Option(displayName = "Add parentheses around the first argument", description = "Add parentheses around the first argument if it is not a simple expression. " + - "Default true; if false no change will be made. ", + "Default true; if false, calls whose first argument would need parentheses are left unchanged.", required = false) @Nullable Boolean addParentheses; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/ThreadStopUnsupported.java b/src/main/java/org/openrewrite/java/migrate/lang/ThreadStopUnsupported.java index 9642a4f717..b38e3a0f39 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/ThreadStopUnsupported.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/ThreadStopUnsupported.java @@ -41,9 +41,10 @@ public class ThreadStopUnsupported extends Recipe { final String displayName = "Replace `Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` with `throw new UnsupportedOperationException()`"; @Getter - final String description = "`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throws a `new UnsupportedOperationException` in Java 21+. " + - "This recipe makes that explicit, as the migration is more complicated. " + - "See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html ."; + final String description = "`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throw an `UnsupportedOperationException` in Java 21+. " + + "This recipe makes that explicit, and adds a comment pointing to the " + + "[migration guide](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html), " + + "as the migration is more complicated. On earlier Java versions only the comment is added."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericMethodInvocations.java b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericMethodInvocations.java index ecdbdea889..741842437c 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericMethodInvocations.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/var/UseVarForGenericMethodInvocations.java @@ -38,7 +38,8 @@ public class UseVarForGenericMethodInvocations extends Recipe { @Getter final String description = "Apply `var` to variables initialized by invocations of generic methods. " + - "This recipe ignores generic factory methods without parameters, because open rewrite cannot handle them correctly ATM."; + "Invocations with neither type nor method arguments are left alone, as their type arguments are inferred from the declared type, " + + "which `var` would lose."; @Override public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java b/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java index d217197f0c..e112d5fe23 100644 --- a/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java +++ b/src/main/java/org/openrewrite/java/migrate/util/OptionalStreamRecipe.java @@ -35,7 +35,7 @@ public class OptionalStreamRecipe extends Recipe { final String displayName = "Replace `filter(Optional::isPresent).map(Optional::get)` with `flatMap(Optional::stream)`"; @Getter - final String description = "Migrate Java 8 `Optional.filter(Optional::isPresent).map(Optional::get)` to Java 11 `.flatMap(Optional::stream)`."; + final String description = "Replace `Stream.filter(Optional::isPresent).map(Optional::get)` with `.flatMap(Optional::stream)` in Java 9 or higher."; private static final MethodMatcher mapMatcher = new MethodMatcher("java.util.stream.Stream map(java.util.function.Function)"); private static final MethodMatcher filterMatcher = new MethodMatcher("java.util.stream.Stream filter(java.util.function.Predicate)"); From 05a015da7bde7c437a6471b659522959c09082c0 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:44:11 +0100 Subject: [PATCH 5/7] Give recipe options distinct, sentence-case display names The seven `ReplaceComSunAWTUtilitiesMethods` and two `ReplaceLocalizedStreamMethods` options each shared one display name and description, and `AboutJavaVersion.whenUsesType` had no display name. Option display names that were phrased as questions or carried their default value now read as short labels, and descriptions end in a period. --- .../java/migrate/AddJDeprScanPlugin.java | 2 +- .../AddMissingMethodImplementation.java | 6 ++-- .../java/migrate/ReplaceAWTGetPeerMethod.java | 8 ++--- .../ReplaceComSunAWTUtilitiesMethods.java | 35 +++++++++++-------- .../ReplaceLocalizedStreamMethods.java | 10 +++--- .../java/migrate/UseJavaUtilBase64.java | 2 +- .../guava/AbstractNoGuavaImmutableOf.java | 4 +-- ...dateAnnotationAttributeJavaxToJakarta.java | 2 +- .../java/migrate/javax/AddJaxbRuntime.java | 2 +- .../java/migrate/lang/UseTextBlocks.java | 6 ++-- .../java/migrate/search/AboutJavaVersion.java | 3 +- 11 files changed, 45 insertions(+), 35 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java b/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java index 89dc0bc261..e2aaa90d9b 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java +++ b/src/main/java/org/openrewrite/java/migrate/AddJDeprScanPlugin.java @@ -34,7 +34,7 @@ @RequiredArgsConstructor public class AddJDeprScanPlugin extends Recipe { - @Option(displayName = "release", description = "Specifies the Java SE release that provides the set of deprecated APIs for scanning.", required = false, example = "11") + @Option(displayName = "Release", description = "Specifies the Java SE release that provides the set of deprecated APIs for scanning.", required = false, example = "11") private final String release; @Getter diff --git a/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java b/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java index 1a02ec6c12..0156c01aca 100644 --- a/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java +++ b/src/main/java/org/openrewrite/java/migrate/AddMissingMethodImplementation.java @@ -36,17 +36,17 @@ public class AddMissingMethodImplementation extends Recipe { @Option(displayName = "Fully qualified class name", - description = "A fully qualified class being implemented with missing method.", + description = "The fully qualified name of the interface whose method may be missing from its implementations.", example = "com.yourorg.FooBar") String fullyQualifiedClassName; @Option(displayName = "Method pattern", - description = "A method pattern for matching required method definition.", + description = "A method pattern matching the required method declaration.", example = "*..* hello(..)") String methodPattern; @Option(displayName = "Method template", - description = "Template of method to add", + description = "Template of the method to add.", example = "public String hello() { return \\\"Hello from #{}!\\\"; }") String methodTemplateString; diff --git a/src/main/java/org/openrewrite/java/migrate/ReplaceAWTGetPeerMethod.java b/src/main/java/org/openrewrite/java/migrate/ReplaceAWTGetPeerMethod.java index c4c87296a1..3f997a7d41 100644 --- a/src/main/java/org/openrewrite/java/migrate/ReplaceAWTGetPeerMethod.java +++ b/src/main/java/org/openrewrite/java/migrate/ReplaceAWTGetPeerMethod.java @@ -33,14 +33,14 @@ @Value public class ReplaceAWTGetPeerMethod extends Recipe { - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`getPeer` method pattern", + description = "A method pattern matching the `getPeer()` method to replace.", example = "java.awt.* getPeer()", required = false) String getPeerMethodPattern; - @Option(displayName = "The LightweightPeer interface FQCN", - description = "The fully qualified class name of the LightweightPeer interface to replace in `instanceof`.", + @Option(displayName = "`LightweightPeer` interface", + description = "The fully qualified name of the `LightweightPeer` interface to replace in `instanceof`.", example = "java.awt.peer.LightweightPeer", required = false) String lightweightPeerFQCN; diff --git a/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java b/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java index f018627185..4911b7a136 100644 --- a/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/ReplaceComSunAWTUtilitiesMethods.java @@ -34,45 +34,52 @@ @Value public class ReplaceComSunAWTUtilitiesMethods extends Recipe { - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`isTranslucencySupported` method pattern", + description = "A method pattern matching the `AWTUtilities.isTranslucencySupported(Translucency)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)", required = false) String getAWTIsWindowsTranslucencyPattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`isWindowOpaque` method pattern", + description = "A method pattern matching the `AWTUtilities.isWindowOpaque(Window)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilities isWindowOpaque(java.awt.Window)", required = false) String isWindowOpaquePattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`isTranslucencyCapable` method pattern", + description = "A method pattern matching the `AWTUtilities.isTranslucencyCapable(GraphicsConfiguration)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)", required = false) String isTranslucencyCapablePattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`setWindowOpacity` method pattern", + description = "A method pattern matching the `AWTUtilities.setWindowOpacity(Window, float)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilities setWindowOpacity(java.awt.Window, float)", required = false) String setWindowOpacityPattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`getWindowOpacity` method pattern", + description = "A method pattern matching the `AWTUtilities.getWindowOpacity(Window)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilities getWindowOpacity(java.awt.Window)", required = false) String getWindowOpacityPattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`getWindowShape` method pattern", + description = "A method pattern matching the `AWTUtilities.getWindowShape(Window)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilitiesTest getWindowShape(java.awt.Window)", required = false) String getWindowShapePattern; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`setComponentMixingCutoutShape` method pattern", + description = "A method pattern matching the `AWTUtilities.setComponentMixingCutoutShape(Component, Shape)` method to replace. " + + "Defaults to the method on `com.sun.awt.AWTUtilities`.", example = "com.test.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)", required = false) String setComponentMixingCutoutShapePattern; diff --git a/src/main/java/org/openrewrite/java/migrate/ReplaceLocalizedStreamMethods.java b/src/main/java/org/openrewrite/java/migrate/ReplaceLocalizedStreamMethods.java index 5d6efaaa5a..1a0d1b98c0 100644 --- a/src/main/java/org/openrewrite/java/migrate/ReplaceLocalizedStreamMethods.java +++ b/src/main/java/org/openrewrite/java/migrate/ReplaceLocalizedStreamMethods.java @@ -33,14 +33,16 @@ @Value public class ReplaceLocalizedStreamMethods extends Recipe { - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`getLocalizedInputStream` method pattern", + description = "A method pattern matching the `getLocalizedInputStream(InputStream)` method to replace. " + + "Defaults to the method on `java.lang.Runtime`.", example = "java.lang.Runtime getLocalizedInputStream(java.io.InputStream)", required = false) String localizedInputStreamMethodMatcher; - @Option(displayName = "Method pattern to replace", - description = "The method pattern to match and replace.", + @Option(displayName = "`getLocalizedOutputStream` method pattern", + description = "A method pattern matching the `getLocalizedOutputStream(OutputStream)` method to replace. " + + "Defaults to the method on `java.lang.Runtime`.", example = "java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)", required = false) String localizedOutputStreamMethodMatcher; diff --git a/src/main/java/org/openrewrite/java/migrate/UseJavaUtilBase64.java b/src/main/java/org/openrewrite/java/migrate/UseJavaUtilBase64.java index 6609b30d40..6b3c489d32 100644 --- a/src/main/java/org/openrewrite/java/migrate/UseJavaUtilBase64.java +++ b/src/main/java/org/openrewrite/java/migrate/UseJavaUtilBase64.java @@ -36,7 +36,7 @@ public class UseJavaUtilBase64 extends Recipe { private final String sunPackage; @Getter - @Option(displayName = "Use Mime Coder", description = "Use `Base64.getMimeEncoder()/getMimeDecoder()` instead of `Base64.getEncoder()/getDecoder()`.", required = false, example = "false") + @Option(displayName = "Use MIME coder", description = "Use `Base64.getMimeEncoder()`/`getMimeDecoder()` instead of `Base64.getEncoder()`/`getDecoder()`.", required = false, example = "false") boolean useMimeCoder; @Getter diff --git a/src/main/java/org/openrewrite/java/migrate/guava/AbstractNoGuavaImmutableOf.java b/src/main/java/org/openrewrite/java/migrate/guava/AbstractNoGuavaImmutableOf.java index 440e870621..8b93c2dc08 100644 --- a/src/main/java/org/openrewrite/java/migrate/guava/AbstractNoGuavaImmutableOf.java +++ b/src/main/java/org/openrewrite/java/migrate/guava/AbstractNoGuavaImmutableOf.java @@ -42,8 +42,8 @@ abstract class AbstractNoGuavaImmutableOf extends Recipe { private final String methodName; private final int minJavaVersion; - @Option(displayName = "Whether to convert return type (the default value is false).", - description = "converting the return type from Guava Type to Java Type " + + @Option(displayName = "Convert return type", + description = "Also convert declared types from the Guava type to the Java type. " + "The default value is false.", example = "true", required = false) diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java index 9e2f22da38..441ca33a34 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java @@ -40,7 +40,7 @@ public class UpdateAnnotationAttributeJavaxToJakarta extends Recipe { @Option( displayName = "Annotation signature", description = "An annotation signature to match.", - example = "@javax.jms..*", + example = "@jakarta.jms..*", required = false ) String signature; diff --git a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java index c6fd281a8e..24e2baecd9 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java @@ -56,7 +56,7 @@ public class AddJaxbRuntime extends ScanningRecipe { private static final String RUNTIME_VERSION = "2.3.x"; @Option(displayName = "JAXB run-time", - description = "Which implementation of the JAXB run-time that will be added to maven projects that have transitive dependencies on the JAXB API", + description = "Which implementation of the JAXB run-time to add to projects that have transitive dependencies on the JAXB API.", valid = {"glassfish", "sun"}, example = "glassfish") String runtime; diff --git a/src/main/java/org/openrewrite/java/migrate/lang/UseTextBlocks.java b/src/main/java/org/openrewrite/java/migrate/lang/UseTextBlocks.java index 8f85b2b098..12aeb4c4df 100644 --- a/src/main/java/org/openrewrite/java/migrate/lang/UseTextBlocks.java +++ b/src/main/java/org/openrewrite/java/migrate/lang/UseTextBlocks.java @@ -45,14 +45,14 @@ @EqualsAndHashCode(callSuper = false) @Value public class UseTextBlocks extends Recipe { - @Option(displayName = "Whether to convert strings without newlines (the default value is true).", - description = "Whether or not strings without newlines should be converted to text block when processing code. " + + @Option(displayName = "Convert strings without newlines", + description = "Whether strings without newlines should be converted to text blocks. " + "The default value is true.", example = "true", required = false) boolean convertStringsWithoutNewlines; - @Option(displayName = "Whether to avoid line continuation escape sequences.", + @Option(displayName = "Avoid line continuation escape sequences", description = "When enabled, the recipe avoids using `\\` line continuation escapes in text blocks " + "where the content contains newlines. Non-newline-joined strings are placed on the same " + "text block line instead. The default value is false.", diff --git a/src/main/java/org/openrewrite/java/migrate/search/AboutJavaVersion.java b/src/main/java/org/openrewrite/java/migrate/search/AboutJavaVersion.java index a17f1c51f2..d6eab9156b 100644 --- a/src/main/java/org/openrewrite/java/migrate/search/AboutJavaVersion.java +++ b/src/main/java/org/openrewrite/java/migrate/search/AboutJavaVersion.java @@ -38,8 +38,9 @@ public class AboutJavaVersion extends Recipe { transient JavaVersionPerSourceSet javaVersionPerSourceSet = new JavaVersionPerSourceSet(this); transient Set seenSourceSets = new HashSet<>(); - @Option(required = false, + @Option(displayName = "When uses type", description = "Only mark the Java version when this type is in use.", + required = false, example = "lombok.val") @Nullable String whenUsesType; From aeb7a83f99851c16a19067f237b33d62e533e164 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:44:16 +0100 Subject: [PATCH 6/7] Make `UpdateAnnotationAttributeJavaxToJakarta` `signature` option required The option was declared optional, but a missing signature failed with a `NullPointerException` when building the `AnnotationMatcher`. Every declarative use passes a signature, so require it instead. --- .../jakarta/UpdateAnnotationAttributeJavaxToJakarta.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java index 441ca33a34..9111f5dc92 100644 --- a/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java +++ b/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java @@ -40,8 +40,7 @@ public class UpdateAnnotationAttributeJavaxToJakarta extends Recipe { @Option( displayName = "Annotation signature", description = "An annotation signature to match.", - example = "@jakarta.jms..*", - required = false + example = "@jakarta.jms..*" ) String signature; From 65a8267bf4db26c511a67102bfe6a73f42c7a15a Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Sun, 25 Oct 2026 12:45:06 +0100 Subject: [PATCH 7/7] Regenerate `recipes.csv` --- .../resources/META-INF/rewrite/recipes.csv | 149 +++++++++--------- 1 file changed, 73 insertions(+), 76 deletions(-) diff --git a/src/main/resources/META-INF/rewrite/recipes.csv b/src/main/resources/META-INF/rewrite/recipes.csv index ab0e0e4fd2..7feb7ca12f 100644 --- a/src/main/resources/META-INF/rewrite/recipes.csv +++ b/src/main/resources/META-INF/rewrite/recipes.csv @@ -11,25 +11,25 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify. maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.jspecify.MigrateToJSpecify,Migrate to JSpecify,This recipe will migrate to JSpecify annotations from various other nullability annotation standards.,55,,,JSpecify,Java,,,Recipes for adopting [JSpecify](https://jspecify.dev/) nullability annotations.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AccessController,Remove Security AccessController,The Security Manager API is unsupported in Java 24. This recipe will remove the usage of `java.security.AccessController`.,4,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddAspectJToolsToAspectJMavenPlugin,Add `aspectjtools` to the AspectJ Maven plugin,"Pins `aspectjtools` 1.9.25.1 on the `dev.aspectj:aspectj-maven-plugin`, as the AspectJ compiler bundled with the plugin is too old to read Java 25 bytecode. An existing `aspectjtools` plugin dependency is left for `UpgradeDependencyVersion` to upgrade, rather than being reset to this version.",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddJDeprScanPlugin,Add `JDeprScan` Maven Plug-in,Add the `JDeprScan` Maven plugin to scan class files for uses of deprecated APIs.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""release"",""type"":""String"",""displayName"":""release"",""description"":""Specifies the Java SE release that provides the set of deprecated APIs for scanning."",""example"":""11""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddJDeprScanPlugin,Add `JDeprScan` Maven plugin,Add the `JDeprScan` Maven plugin to scan class files for uses of deprecated APIs.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""release"",""type"":""String"",""displayName"":""Release"",""description"":""Specifies the Java SE release that provides the set of deprecated APIs for scanning."",""example"":""11""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddLombokAnnotationProcessorPath,Add `lombok` to the `maven-compiler-plugin` annotation processor paths,"Add the `lombok` annotation processor path, matching the version of the `lombok` dependency. Once `annotationProcessorPaths` is configured, javac no longer discovers annotation processors on the classpath, so Lombok has to be listed there explicitly to keep running.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddLombokMapstructBinding,Add `lombok-mapstruct-binding` when both MapStruct and Lombok are used,Add the `lombok-mapstruct-binding` annotation processor as needed when both MapStruct and Lombok are used.,7,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddLombokMapstructBindingMavenDependencyOnly,Add `lombok-mapstruct-binding` dependency for Maven when both MapStruct and Lombok are used,"Add the `lombok-mapstruct-binding` when both MapStruct and Lombok are used, and the dependency does not already exist. Only to be called from `org.openrewrite.java.migrate.AddLombokMapstructBinding` to reduce redundant checks.",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMapstructAnnotationProcessorPath,Add `mapstruct-processor` to the `maven-compiler-plugin` annotation processor paths,"Add the `mapstruct-processor` annotation processor path, matching the version of the `mapstruct` dependency, so that MapStruct mappers are generated when annotation processing is configured explicitly.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMissingMethodImplementation,Adds missing method implementations,Check for missing methods required by interfaces and adds them.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fullyQualifiedClassName"",""type"":""String"",""displayName"":""Fully qualified class name"",""description"":""A fully qualified class being implemented with missing method."",""example"":""com.yourorg.FooBar"",""required"":true},{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""A method pattern for matching required method definition."",""example"":""*..* hello(..)"",""required"":true},{""name"":""methodTemplateString"",""type"":""String"",""displayName"":""Method template"",""description"":""Template of method to add"",""example"":""public String hello() { return \\\""Hello from #{}!\\\""; }"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMockitoJavaAgentToMavenSurefirePlugin,Add Mockito Java Agent to Maven Surefire Plugin,"Mockito attaches its Byte Buddy agent to the running JVM at test time, which the JDK has warned about since Java 21 and intends to disallow. This recipe instead loads the agent up front through the Maven Surefire plugin, adding the `maven-dependency-plugin` `properties` goal to resolve the agent jar path, to silence the warning and stay ahead of the JDK change.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddStaticVariableOnProducerSessionBean,Adds `static` modifier to `@Produces` fields that are in session beans,"Ensures that the fields annotated with `@Produces` which is inside the session bean (`@Stateless`, `@Stateful`, or `@Singleton`) are declared `static`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSuppressionForIllegalReflectionWarningsPlugin,Add maven jar plugin to suppress illegal reflection warnings,Adds a maven jar plugin that's configured to suppress Illegal Reflection Warnings.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""An exact version number, or node-style semver selector used to select the version number."",""example"":""29.X""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSurefireFailsafeArgLine,Add `argLine` to surefire and failsafe plugins,"Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, merging with any existing argLine value without duplicating arguments. The `@{argLine}` [late property reference](https://maven.apache.org/surefire/maven-surefire-plugin/faq.html) is prepended so that an agent injected by another plugin during the build, such as the JaCoCo coverage agent from `jacoco-maven-plugin:prepare-agent`, is preserved rather than overwritten. It is not added when the existing `argLine` already references the `argLine` property.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""argLine"",""type"":""String"",""displayName"":""Arg line"",""description"":""The arguments to add to the surefire and failsafe plugin `argLine` configuration. Individual arguments are space-separated. Arguments already present in the existing argLine are not duplicated."",""example"":""--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMissingMethodImplementation,Add missing method implementations,Add a method to classes that implement the given interface but are missing the method.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fullyQualifiedClassName"",""type"":""String"",""displayName"":""Fully qualified class name"",""description"":""The fully qualified name of the interface whose method may be missing from its implementations."",""example"":""com.yourorg.FooBar"",""required"":true},{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""A method pattern matching the required method declaration."",""example"":""*..* hello(..)"",""required"":true},{""name"":""methodTemplateString"",""type"":""String"",""displayName"":""Method template"",""description"":""Template of the method to add."",""example"":""public String hello() { return \\\""Hello from #{}!\\\""; }"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddMockitoJavaAgentToMavenSurefirePlugin,Add Mockito Java agent to Maven Surefire plugin,"Mockito attaches its Byte Buddy agent to the running JVM at test time, which the JDK has warned about since Java 21 and intends to disallow. This recipe instead loads the agent up front through the Maven Surefire plugin, adding the `maven-dependency-plugin` `properties` goal to resolve the agent jar path, to silence the warning and stay ahead of the JDK change.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddStaticVariableOnProducerSessionBean,Add `static` modifier to `@Produces` fields in session beans,"Ensures that the fields annotated with `@Produces` which is inside the session bean (`@Stateless`, `@Stateful`, or `@Singleton`) are declared `static`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSuppressionForIllegalReflectionWarningsPlugin,Add `maven-jar-plugin` to suppress illegal reflection warnings,Adds a `maven-jar-plugin` with `Add-Opens` manifest entries to `war` and `ear` modules to suppress illegal reflection warnings.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""An exact version number, or node-style semver selector used to select the version number."",""example"":""29.X""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.AddSurefireFailsafeArgLine,Add `argLine` to Maven Surefire and Failsafe plugins,"Adds the specified arguments to the `argLine` configuration of the Maven Surefire and Failsafe plugins, merging with any existing `argLine` value without duplicating arguments. The `@{argLine}` [late property reference](https://maven.apache.org/surefire/maven-surefire-plugin/faq.html) is prepended so that an agent injected by another plugin during the build, such as the JaCoCo coverage agent from `jacoco-maven-plugin:prepare-agent`, is preserved rather than overwritten. It is not added when the existing `argLine` already references the `argLine` property.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""argLine"",""type"":""String"",""displayName"":""Arg line"",""description"":""The arguments to add to the Maven Surefire and Failsafe plugin `argLine` configuration. Individual arguments are space-separated. Arguments already present in the existing `argLine` are not duplicated."",""example"":""--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ArrayStoreExceptionToTypeNotPresentException,Catch `TypeNotPresentException` thrown by `Class.getAnnotation()`,Replace catch blocks for `ArrayStoreException` around `Class.getAnnotation()` with `TypeNotPresentException` to ensure compatibility with Java 11+.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BeanDiscovery,Behavior change to bean discovery in modules with `beans.xml` file with no version specified,Alters beans with missing version attribute to include this attribute as well as the bean-discovery-mode="all" attribute to maintain an explicit bean archive.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BeanDiscovery,Add `version` and `bean-discovery-mode` to `beans.xml` files without a version,"Alters `beans.xml` files with a missing `version` attribute to include this attribute as well as `bean-discovery-mode=""all""`, to maintain an explicit bean archive.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BeansXmlNamespace,Change `beans.xml` `schemaLocation` to match XML namespace,Set the `schemaLocation` that corresponds to the `xmlns` set in `beans.xml` files.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BounceCastleFromJdk15OntoJdk18On,Migrate Bouncy Castle to `jdk18on`,"This recipe will upgrade Bouncy Castle dependencies from any of the legacy artifact suffixes `-jdk12`, `-jdk14`, `-jdk15`, `-jdk15+`, `-jdk16`, `-jdk15on` or `-jdk15to18` to `-jdk18on`. The `bctsp` artifacts map onto `bcpkix`, which absorbed the time stamp protocol support in 1.47.",57,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BouncyCastleDerStringGetInstanceReturnType,Use `ASN1*String` for the result of `DER*String.getInstance(..)`,"In Bouncy Castle 1.71 the `getInstance(..)` methods on the `DER*String` ASN.1 types were pulled up to their `ASN1*String` supertypes, widening their return type. The call itself still compiles, as static methods are inherited, but assigning the result to a `DER*String` variable or field no longer does. This recipe widens those declared types to the matching `ASN1*String`, which compiles against both the `-jdk15on` and `-jdk18on` artifacts, and can therefore safely be applied ahead of the upgrade.",13,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BouncyCastleFromJdk15OnToJdk15to18,Migrate Bouncy Castle to `jdk15to18` for Java < 8,"This recipe replaces the Bouncy Castle artifacts from any of the legacy artifact suffixes `-jdk12`, `-jdk14`, `-jdk15`, `-jdk15+`, `-jdk16` or `-jdk15on` to `-jdk15to18`. Those artifacts aren't maintained anymore and `jdk18on` is only for Java 8 and above. The `jdk15to18` artifact is the up-to-date replacement for Java < 8. The `bctsp` artifacts map onto `bcpkix`, which absorbed the time stamp protocol support in 1.47.",34,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.BouncyCastleSphincsPlusToPqcLegacy,Move Bouncy Castle SPHINCS+ classes to `pqc.legacy`,"Bouncy Castle 1.78 moved the pre-standardization SPHINCS+ implementation from `org.bouncycastle.pqc.crypto.sphincsplus` to `org.bouncycastle.pqc.legacy.sphincsplus`, to free up the original package for the FIPS 205 SLH-DSA implementation. All types moved unchanged, so this is a straight package rename.",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.CastArraysAsListToList,Remove explicit casts on `Arrays.asList(..).toArray()`,"Convert code like `(Integer[]) Arrays.asList(1, 2, 3).toArray()` to `Arrays.asList(1, 2, 3).toArray(new Integer[0])`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ChangeDefaultKeyStore,Return String `jks` when `KeyStore.getDefaultType()` is called,"In Java 11 the default keystore was updated from JKS to PKCS12. As a result, applications relying on KeyStore.getDefaultType() may encounter issues after migrating, unless their JKS keystore has been converted to PKCS12. This recipe returns default key store of `jks` when `KeyStore.getDefaultType()` method is called to use the pre Java 11 default keystore.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ChangeDefaultKeyStore,Replace `KeyStore.getDefaultType()` with `"jks"`,"In Java 11 the default keystore was updated from JKS to PKCS12. As a result, applications relying on `KeyStore.getDefaultType()` may encounter issues after migrating, unless their JKS keystore has been converted to PKCS12. This recipe returns default key store of `jks` when `KeyStore.getDefaultType()` method is called to use the pre Java 11 default keystore.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ChangeMethodInvocationReturnType,Change method invocation return type,Changes the return type of a method invocation.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""A method pattern that is used to find matching method declarations/invocations."",""example"":""org.mockito.Matchers anyVararg()"",""required"":true},{""name"":""newReturnType"",""type"":""String"",""displayName"":""New method invocation return type"",""description"":""The fully qualified new return type of method invocation."",""example"":""long"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations,Migrate com.intellij:annotations to org.jetbrains:annotations,This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.CommentJava24KotlinCap,Explain why the Java version was capped at 24 for Kotlin modules,"Adds an explanatory comment to Maven `pom.xml` files in modules that were held at Java 24 because they compile Kotlin and depend on `kotlin-stdlib` older than 2.3, which cannot target Java 25 bytecode. Only modules whose resolved `kotlin-stdlib` is older than 2.3 are commented; the comment names that `kotlin-stdlib` version and the next step needed to reach Java 25. Self-healing: the comment is added while the module is at Java 24 and removed again once the module reaches a higher Java version (for instance after its Kotlin was upgraded to 2.3), so it only ever remains on modules that truly stay at Java 24 — whether a Kotlin 1.x cap or a 2.0-2.2 module whose Kotlin upgrade could not be applied. Intended to run last, scoped to modules that compile Kotlin.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -45,22 +45,22 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.D maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.EnableLombokAnnotationProcessor,Enable Lombok annotation processor,With Java 23 the encapsulation of JDK internals made it necessary to configure annotation processors like Lombok explicitly. The change is valid for older versions as well.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.IBMJDKtoOracleJDK,Migrate from IBM Runtimes to Oracle Runtimes,This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions necessary for migrating from IBM Runtimes to Oracle Runtimes.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.IBMSemeru,Migrate to IBM Semeru Runtimes,This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions only available in IBM Semeru Runtimes.,20,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException,Replace `IllegalArgumentException` with `AlreadyConnectedException` in `DatagramChannel.send()` method,Replace `IllegalArgumentException` with `AlreadyConnectedException` for DatagramChannel.send() to ensure compatibility with Java 11+.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.IllegalArgumentExceptionToAlreadyConnectedException,Replace `IllegalArgumentException` with `AlreadyConnectedException` in `DatagramChannel.send()` method,Replace `IllegalArgumentException` with `AlreadyConnectedException` for `DatagramChannel.send()` to ensure compatibility with Java 11+.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.InternalBindPackages,Use `com.sun.xml.bind.*` instead of `com.sun.xml.internal.bind.*`,Do not use APIs from `com.sun.xml.internal.bind.*` packages.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREDoNotUseSunNetSslAPIs,Use `javax.net.ssl` instead of `com.sun.net.ssl`,Do not use APIs from `com.sun.net.ssl` packages.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalSslProvider,Use `com.ibm.jsse2` instead of `com.sun.net.ssl.internal.ssl`,Do not use the `com.sun.net.ssl.internal.ssl.Provider` class.,5,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocol,Use `com.ibm.net.ssl.www2.protocol` instead of `com.sun.net.ssl.internal.www.protocol`,Do not use the `com.sun.net.ssl.internal.www.protocol` package.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocolHttpsHandler,Use `com.ibm.net.ssl.www2.protocol.https.Handler` instead of `com.sun.net.ssl.internal.www.protocol.https.Handler`,Do not use the `com.sun.net.ssl.internal.www.protocol.https.Handler` class.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREJdbcInterfaceNewMethods,Adds missing JDBC interface methods,Add method implementations stubs to classes that implement JDBC interfaces.,10,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREThrowableFinalMethods,Rename final method declarations `getSuppressed()` and `addSuppressed(Throwable exception)` in classes that extend `Throwable`,The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. These methods were added to Throwable in Java 7 and are marked final which cannot be overridden.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREThrowableFinalMethods,Rename final method declarations `getSuppressed()` and `addSuppressed(Throwable exception)` in classes that extend `Throwable`,The recipe renames `getSuppressed()` and `addSuppressed(Throwable exception)` methods in classes that extend `java.lang.Throwable` to `myGetSuppressed` and `myAddSuppressed(Throwable)`. These methods were added to `Throwable` in Java 7 and are marked final which cannot be overridden.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JREWrapperInterface,Add missing `isWrapperFor` and `unwrap` methods,Add method implementations stubs to classes that implement `java.sql.Wrapper`.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.Java8toJava11,Migrate to Java 11,"This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.",321,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JavaBestPractices,Java best practices,"Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.",936,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.JpaCacheProperties,Disable the persistence unit second-level cache,Sets an explicit value for the shared cache mode.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.Jre17AgentMainPreMainPublic,Set visibility of `premain` and `agentmain` methods to `public`,Check for a behavior change in Java agents.,5,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.Krb5LoginModuleClass,Use `com.sun.security.auth.module.Krb5LoginModule` instead of `com.ibm.security.auth.module.Krb5LoginModule`,Do not use the `com.ibm.security.auth.module.Krb5LoginModule` class.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MXBeanRule,MBean and MXBean interfaces must be public,Sets visibility of MBean and MXBean interfaces to public.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MigrateGraalVMResourceConfig,Migrate GraalVM resource-config.json to glob patterns,Migrates GraalVM native-image resource-config.json files from the legacy regex pattern format (JDK 21 and earlier) to the new glob pattern format (JDK 23+). Converts `pattern` entries to `glob` entries and restructures the format. Note: `excludes` are no longer supported in the new format and will be removed.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MXBeanRule,Make MBean and MXBean interfaces public,Sets visibility of MBean and MXBean interfaces to public.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MigrateGraalVMResourceConfig,Migrate GraalVM `resource-config.json` to glob patterns,Migrates GraalVM `native-image` `resource-config.json` files from the legacy regex pattern format (JDK 21 and earlier) to the new glob pattern format (JDK 23+). Converts `pattern` entries to `glob` entries and restructures the format. Note: `excludes` are no longer supported in the new format and will be removed.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.MigrateZipErrorToZipException,Use `ZipException` instead of `ZipError`,Use `ZipException` instead of the deprecated `ZipError` in Java 9 or higher.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReferenceCloneMethod,Replace `java.lang.ref.Reference.clone()` with constructor call,"The recipe replaces any clone calls that may resolve to a `java.lang.ref.Reference.clone()` or any of its known subclasses: `java.lang.ref.PhantomReference`, `java.lang.ref.SoftReference`, and `java.lang.ref.WeakReference` with a constructor call passing in the referent and reference queue as parameters.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemoveIllegalSemicolons,Remove illegal semicolons,"Remove semicolons after package declarations and imports, no longer accepted in Java 21 as of [JDK-8027682](https://bugs.openjdk.org/browse/JDK-8027682).",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -75,30 +75,30 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.R maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedRMIConnectorServerCredentialTypesConstant,Replace `RMIConnectorServer.CREDENTIAL_TYPES` constant,This recipe replaces the `RMIConnectorServer.CREDENTIAL_TYPES` constant with the `RMIConnectorServer.CREDENTIALS_FILTER_PATTERN` constant.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedRuntimeTraceMethods,Remove `Runtime.traceInstructions(boolean)` and `Runtime.traceMethodCalls` methods,The `traceInstructions` and `traceMethodCalls` methods in `java.lang.Runtime` were deprecated in Java SE 9 and are no longer available in Java SE 13 and later. The recipe removes the invocations of these methods since the method invocations do nothing functionally.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl,Replace `SSLSession.getPeerCertificateChain()` method,The `javax.net.ssl.SSLSession.getPeerCertificateChain()` method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw an `UnsupportedOperationException`. Applications using this method should be updated to use the `javax.net.ssl.SSLSession.getPeerCertificates()` method instead.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedSecurityManagerMethods,Replace deprecated methods in`SecurityManager`,"Replace `SecurityManager` methods `checkAwtEventQueueAccess()`, `checkSystemClipboardAccess()`, `checkMemberAccess()` and `checkTopLevelWindow()` deprecated in Java SE 11 by `checkPermission(new java.security.AllPermission())`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedSecurityManagerMethods,Replace deprecated methods in `SecurityManager`,"Replace `SecurityManager` methods `checkAwtEventQueueAccess()`, `checkSystemClipboardAccess()`, `checkMemberAccess()` and `checkTopLevelWindow()` deprecated in Java SE 11 by `checkPermission(new java.security.AllPermission())`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedSubjectMethods,Adopt `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()` methods`,Replaces the `javax.security.auth.Subject.getSubject()` and `javax.security.auth.Subject.doAs()` methods with `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()`.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedToolProviderConstructor,Change `javax.tools.ToolProvider` methods calls to static,"The `javax.tools.ToolProvider()` constructor has been removed in Java SE 16 since the class only contains static methods. The recipe converts `javax.tools.ToolProvider getSystemJavaCompiler()`, `javax.tools.ToolProvider getSystemDocumentationTool()` and `javax.tools.ToolProvider getSystemToolClassLoader()` to static methods.",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.RemovedZipFinalizeMethods,"Replace `finalize` method in `java.util.zip.ZipFile`, `java.util.zip.Inflater` and `java.util.zip.Deflater`","The `finalize` method in `java.util.zip.ZipFile` is replaced with the `close` method and is replaced by the `end` method in `java.util.zip.Inflater` and `java.util.zip.Deflater` as it is no longer available in Java SE 12 and later.",4,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceAWTGetPeerMethod,Replace AWT `getPeer()` method,This recipe replaces the use of `getPeer()` method in `java.awt.*` classes. `component.getPeer() != null` is replaced with `component.isDisplayable()` and `component.getPeer() instanceof LightweightPeer` is replaced with `component.isLightweight()`.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""getPeerMethodPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.awt.* getPeer()"",""value"":""java.awt.* getPeer()""},{""name"":""lightweightPeerFQCN"",""type"":""String"",""displayName"":""The LightweightPeer interface FQCN"",""description"":""The fully qualified class name of the LightweightPeer interface to replace in `instanceof`."",""example"":""java.awt.peer.LightweightPeer"",""value"":""java.awt.peer.LightweightPeer""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods,Replace `com.sun.awt.AWTUtilities` static method invocations,"This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. The methods replaced are `AWTUtilities.isTranslucencySupported()`, `AWTUtilities.setWindowOpacity()`, `AWTUtilities.getWindowOpacity()`, `AWTUtilities.getWindowShape()`, `AWTUtilities.isWindowOpaque()`, `AWTUtilities.isTranslucencyCapable()` and `AWTUtilities.setComponentMixingCutoutShape()`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""getAWTIsWindowsTranslucencyPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)"",""value"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)""},{""name"":""isWindowOpaquePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isWindowOpaque(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities isWindowOpaque(java.awt.Window)""},{""name"":""isTranslucencyCapablePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)"",""value"":""com.sun.awt.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)""},{""name"":""setWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setWindowOpacity(java.awt.Window, float)"",""value"":""com.sun.awt.AWTUtilities setWindowOpacity(java.awt.Window, float)""},{""name"":""getWindowOpacityPattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities getWindowOpacity(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowOpacity(java.awt.Window)""},{""name"":""getWindowShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilitiesTest getWindowShape(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowShape(java.awt.Window)""},{""name"":""setComponentMixingCutoutShapePattern"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""com.test.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)"",""value"":""com.sun.awt.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceLocalizedStreamMethods,Replace `getLocalizedInputStream` and `getLocalizedOutputStream` with direct assignment,Replaces `Runtime.getLocalizedInputStream(InputStream)` and `Runtime.getLocalizedOutputStream(OutputStream)` with their direct arguments. This modification is made because the previous implementation of `getLocalizedInputStream` and `getLocalizedOutputStream` merely returned the arguments provided.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""localizedInputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)"",""value"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)""},{""name"":""localizedOutputStreamMethodMatcher"",""type"":""String"",""displayName"":""Method pattern to replace"",""description"":""The method pattern to match and replace."",""example"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)"",""value"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceAWTGetPeerMethod,Replace AWT `getPeer()` method,This recipe replaces the use of `getPeer()` method in `java.awt.*` classes. `component.getPeer() != null` is replaced with `component.isDisplayable()` and `component.getPeer() instanceof LightweightPeer` is replaced with `component.isLightweight()`.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""getPeerMethodPattern"",""type"":""String"",""displayName"":""`getPeer` method pattern"",""description"":""A method pattern matching the `getPeer()` method to replace."",""example"":""java.awt.* getPeer()"",""value"":""java.awt.* getPeer()""},{""name"":""lightweightPeerFQCN"",""type"":""String"",""displayName"":""`LightweightPeer` interface"",""description"":""The fully qualified name of the `LightweightPeer` interface to replace in `instanceof`."",""example"":""java.awt.peer.LightweightPeer"",""value"":""java.awt.peer.LightweightPeer""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceComSunAWTUtilitiesMethods,Replace `com.sun.awt.AWTUtilities` static method invocations,"This recipe replaces several static calls in `com.sun.awt.AWTUtilities` with the JavaSE 11 equivalent. The methods replaced are `AWTUtilities.isTranslucencySupported()`, `AWTUtilities.setWindowOpacity()`, `AWTUtilities.getWindowOpacity()`, `AWTUtilities.getWindowShape()`, `AWTUtilities.isWindowOpaque()`, `AWTUtilities.isTranslucencyCapable()` and `AWTUtilities.setComponentMixingCutoutShape()`.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""getAWTIsWindowsTranslucencyPattern"",""type"":""String"",""displayName"":""`isTranslucencySupported` method pattern"",""description"":""A method pattern matching the `AWTUtilities.isTranslucencySupported(Translucency)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)"",""value"":""com.sun.awt.AWTUtilities isTranslucencySupported(com.sun.awt.AWTUtilities.Translucency)""},{""name"":""isWindowOpaquePattern"",""type"":""String"",""displayName"":""`isWindowOpaque` method pattern"",""description"":""A method pattern matching the `AWTUtilities.isWindowOpaque(Window)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilities isWindowOpaque(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities isWindowOpaque(java.awt.Window)""},{""name"":""isTranslucencyCapablePattern"",""type"":""String"",""displayName"":""`isTranslucencyCapable` method pattern"",""description"":""A method pattern matching the `AWTUtilities.isTranslucencyCapable(GraphicsConfiguration)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)"",""value"":""com.sun.awt.AWTUtilities isTranslucencyCapable(java.awt.GraphicsConfiguration)""},{""name"":""setWindowOpacityPattern"",""type"":""String"",""displayName"":""`setWindowOpacity` method pattern"",""description"":""A method pattern matching the `AWTUtilities.setWindowOpacity(Window, float)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilities setWindowOpacity(java.awt.Window, float)"",""value"":""com.sun.awt.AWTUtilities setWindowOpacity(java.awt.Window, float)""},{""name"":""getWindowOpacityPattern"",""type"":""String"",""displayName"":""`getWindowOpacity` method pattern"",""description"":""A method pattern matching the `AWTUtilities.getWindowOpacity(Window)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilities getWindowOpacity(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowOpacity(java.awt.Window)""},{""name"":""getWindowShapePattern"",""type"":""String"",""displayName"":""`getWindowShape` method pattern"",""description"":""A method pattern matching the `AWTUtilities.getWindowShape(Window)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilitiesTest getWindowShape(java.awt.Window)"",""value"":""com.sun.awt.AWTUtilities getWindowShape(java.awt.Window)""},{""name"":""setComponentMixingCutoutShapePattern"",""type"":""String"",""displayName"":""`setComponentMixingCutoutShape` method pattern"",""description"":""A method pattern matching the `AWTUtilities.setComponentMixingCutoutShape(Component, Shape)` method to replace. Defaults to the method on `com.sun.awt.AWTUtilities`."",""example"":""com.test.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)"",""value"":""com.sun.awt.AWTUtilities setComponentMixingCutoutShape(java.awt.Component,java.awt.Shape)""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceLocalizedStreamMethods,Replace `getLocalizedInputStream` and `getLocalizedOutputStream` with direct assignment,Replaces `Runtime.getLocalizedInputStream(InputStream)` and `Runtime.getLocalizedOutputStream(OutputStream)` with their direct arguments. This modification is made because the previous implementation of `getLocalizedInputStream` and `getLocalizedOutputStream` merely returned the arguments provided.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""localizedInputStreamMethodMatcher"",""type"":""String"",""displayName"":""`getLocalizedInputStream` method pattern"",""description"":""A method pattern matching the `getLocalizedInputStream(InputStream)` method to replace. Defaults to the method on `java.lang.Runtime`."",""example"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)"",""value"":""java.lang.Runtime getLocalizedInputStream(java.io.InputStream)""},{""name"":""localizedOutputStreamMethodMatcher"",""type"":""String"",""displayName"":""`getLocalizedOutputStream` method pattern"",""description"":""A method pattern matching the `getLocalizedOutputStream(OutputStream)` method to replace. Defaults to the method on `java.lang.Runtime`."",""example"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)"",""value"":""java.lang.Runtime getLocalizedOutputStream(java.io.OutputStream)""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ReplaceStringLiteralValue,Replace `String` literal,Replace the value of a complete `String` literal.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""oldLiteralValue"",""type"":""String"",""displayName"":""Old literal `String` value"",""description"":""The `String` value to replace."",""example"":""apple"",""required"":true},{""name"":""newLiteralValue"",""type"":""String"",""displayName"":""New literal `String` value"",""description"":""The `String` value to replace with."",""example"":""orange"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.SimplifySecurityManagerThreadGroup,Simplify the removed security manager's thread group fallback,Remove a null SecurityManager local used only by the immediately following thread group conditional.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.SimplifySecurityManagerThreadGroup,Simplify the removed security manager's thread group fallback,Remove a `null` `SecurityManager` local used only by the immediately following thread group conditional.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.SunNetSslPackageUnavailable,Replace `com.sun.net.ssl` package,The internal API `com.sun.net.ssl` is removed. The package was intended for internal use only and replacement APIs can be found in the `javax.net.ssl` package.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.SwitchPatternMatching,Adopt switch pattern matching (JEP 441),[JEP 441](https://openjdk.org/jeps/441) describes how some switch statements can be improved with pattern matching. This recipe applies some of those improvements where applicable.,3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.SystemGetSecurityManagerToNull,Replace `System.getSecurityManager()` with `null`,The Security Manager API is unsupported in Java 24. This recipe will replace `System.getSecurityManager()` with `null` to make its behavior more obvious and try to simplify execution paths afterwards.,4,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.ThreadStopDestroy,Remove `Thread.destroy()` and `Thread.stop(Throwable)`,"The `java.lang.Thread.destroy()` method was never implemented, and the `java.lang.Thread.stop(java.lang.Throwable)` method has been unusable since Java SE 8. This recipe removes any usage of these methods from your application.",3,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpdateSdkMan,Update SDKMan Java version,"Update the SDKMAN JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe will update the current distribution to the current default SDKMAN version of the specified major release. The distribution option can be used to specify a specific JVM distribution. Note that these must correspond to valid SDKMAN distributions.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""newVersion"",""type"":""String"",""displayName"":""Java version"",""description"":""The Java version to update to. Use `latest.patch` to upgrade to the latest version within the current major version."",""example"":""17""},{""name"":""newDistribution"",""type"":""String"",""displayName"":""Distribution"",""description"":""The JVM distribution to use."",""example"":""tem""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpdateSdkMan,Update SDKMAN! Java version,"Update the SDKMAN! JDK version in the `.sdkmanrc` file. Given a major release (e.g., 17), the recipe will update the current distribution to the current default SDKMAN! version of the specified major release. The distribution option can be used to specify a specific JVM distribution. Note that these must correspond to valid SDKMAN! distributions.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""newVersion"",""type"":""String"",""displayName"":""Java version"",""description"":""The Java version to update to. Use `latest.patch` to upgrade to the latest version within the current major version."",""example"":""17""},{""name"":""newDistribution"",""type"":""String"",""displayName"":""Distribution"",""description"":""The JVM distribution to use."",""example"":""tem""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava11,Upgrade build to Java 11,Updates build files to use Java 11 as the target/source.,11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava17,Upgrade build to Java 17,Updates build files to use Java 17 as the target/source.,11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava21,Upgrade build to Java 21,Updates build files to use Java 21 as the target/source.,11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava24ForKotlin1x,Upgrade build to Java 24 for Kotlin 1.x,"Kotlin versions before 2.3 only support up to Java 24, and Kotlin 1.x cannot be safely upgraded automatically because crossing the K2 compiler default introduced in Kotlin 2.0 is a source-breaking change. Such modules are therefore capped at Java 24 and annotated with an explanation. Modules already on Kotlin 2.0-2.2 are instead bumped to Kotlin 2.3 by `UpgradeKotlinForJava25` so they can reach Java 25. Applies only to modules that actually compile Kotlin (i.e. contain `.kt` source files), so transitive `kotlin-stdlib` dependencies do not trigger the cap.",11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava25,Upgrade build to Java 25 (non-Kotlin),"Upgrades build files to Java 25 for modules without Kotlin source files. This covers pure Java projects, including those that only pick up `kotlin-stdlib` transitively through another dependency.",11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeBuildToJava25ForKotlin,Upgrade build to Java 25 for Kotlin 2.3+,Upgrades build files to Java 25 for Kotlin modules already on Kotlin 2.3 or later.,11,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeDockerImageVersion,Upgrade Docker image Java version,"Upgrade Docker image tags to use the specified Java version. Updates common Java Docker images including eclipse-temurin, amazoncorretto, azul/zulu-openjdk, and others. Also migrates deprecated images (openjdk, adoptopenjdk) to eclipse-temurin, preserving any tag suffix such as `-jre-alpine`. When a `FROM` is built from a build argument, the default value of the corresponding global `ARG` is upgraded instead, such that `ARG java_version=17` used as `FROM eclipse-temurin:${java_version}` becomes `ARG java_version=25`. Image references built from arguments without a default value are left untouched, as their value can not be determined statically. A digest pin is dropped when the tag is upgraded, as the stale digest would otherwise keep resolving to the old image.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeJavaCiContainerImage,Upgrade CircleCI OpenJDK job images,"Upgrade cimg/openjdk job containers in GitHub Actions and CircleCI to the target Java version, preserving newer versions and unrelated service images.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The minimum Java version for CI job containers."",""example"":""25"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeJavaVersion,Upgrade Java version,"Upgrade build plugin configuration to use the specified Java version. This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of gradle projects, or maven-compiler-plugin target version and related settings. Will not downgrade if the version is newer than the specified version.",10,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeDockerImageVersion,Upgrade Docker image Java version,"Upgrade Docker image tags to use the specified Java version. Updates common Java Docker images including `eclipse-temurin`, `amazoncorretto`, `azul/zulu-openjdk`, and others. Also migrates deprecated images (`openjdk`, `adoptopenjdk`) to `eclipse-temurin`, preserving any tag suffix such as `-jre-alpine`. When a `FROM` is built from a build argument, the default value of the corresponding global `ARG` is upgraded instead, such that `ARG java_version=17` used as `FROM eclipse-temurin:${java_version}` becomes `ARG java_version=25`. Image references built from arguments without a default value are left untouched, as their value can not be determined statically. A digest pin is dropped when the tag is upgraded, as the stale digest would otherwise keep resolving to the old image.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeJavaCiContainerImage,Upgrade CircleCI OpenJDK job images,"Upgrade `cimg/openjdk` job containers in GitHub Actions and CircleCI to the target Java version, preserving newer versions and unrelated service images.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The minimum Java version for CI job containers."",""example"":""25"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeJavaVersion,Upgrade Java version,"Upgrade build plugin configuration to use the specified Java version. This recipe changes `java.toolchain.languageVersion` in `build.gradle(.kts)` of Gradle projects, or `maven-compiler-plugin` target version and related settings. Will not downgrade if the version is newer than the specified version.",10,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeKotlinForJava25,Upgrade Kotlin to 2.3 for Java 25 compatibility,"Only Kotlin 2.3 and later can target Java 25 bytecode, so modules on an older Kotlin are otherwise capped at Java 24. This recipe upgrades modules that compile Kotlin (i.e. contain `.kt` source files) and are already on Kotlin 2.0, 2.1, or 2.2 up to the latest Kotlin 2.3, so they can subsequently be migrated to Java 25. Modules on Kotlin 1.x are left untouched, as crossing the K2 compiler default introduced in Kotlin 2.0 is a source-breaking change that should not be applied automatically. As a safety net the module is also floored at Java 24: if the Kotlin upgrade cannot be applied (for instance because the version is managed externally by a parent or BOM), the module still lands on Java 24 rather than being left behind, and is raised the rest of the way to Java 25 only once it actually reaches Kotlin 2.3.",14,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeKotlinJvmTargetVersion,Upgrade Kotlin `jvmTarget` to match the Java version,Align the Kotlin `jvmTarget` with the project's Java version so the Kotlin compiler emits bytecode at the same level as `javac`. Covers `kotlin-maven-plugin` `` configuration and the Gradle `kotlinOptions { jvmTarget = ... }` / `compilerOptions { jvmTarget = ... }` blocks (Groovy and Kotlin DSL). Will not downgrade if the existing Kotlin target is higher than the requested version.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to align Kotlin's `jvmTarget` with."",""example"":""21"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradePluginsForJava11,Upgrade plugins to Java 11 compatible versions,Updates plugins to version compatible with Java 11.,6,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" @@ -112,8 +112,8 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.U maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeToJava6,Migrate to Java 6,This recipe will apply changes commonly needed when upgrading to Java 6. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,7,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeToJava7,Migrate to Java 7,This recipe will apply changes commonly needed when upgrading to Java 7. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,54,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeToJava8,Migrate to Java 8,This recipe will apply changes commonly needed when upgrading to Java 8. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.,123,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeUnmodeledMavenJavaVersion,Upgrade Java version in alternate Maven builds,"Update explicit Java version properties and compiler settings in pom.xml files parsed as XML without a Maven model, for example in a repository built with Gradle. Property references are left intact.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The minimum Java version."",""example"":""25"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseJavaUtilBase64,Prefer `java.util.Base64` instead of `sun.misc`,Prefer `java.util.Base64` instead of using `sun.misc` in Java 8 or higher. `sun.misc` is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""useMimeCoder"",""type"":""boolean"",""displayName"":""Use Mime Coder"",""description"":""Use `Base64.getMimeEncoder()/getMimeDecoder()` instead of `Base64.getEncoder()/getDecoder()`."",""example"":""false"",""value"":false}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UpgradeUnmodeledMavenJavaVersion,Upgrade Java version in alternate Maven builds,"Update explicit Java version properties and compiler settings in `pom.xml` files parsed as XML without a Maven model, for example in a repository built with Gradle. Property references are left intact.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The minimum Java version."",""example"":""25"",""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseJavaUtilBase64,Prefer `java.util.Base64` instead of `sun.misc`,Prefer `java.util.Base64` instead of using `sun.misc` in Java 8 or higher. `sun.misc` is not exported by the Java module system and accessing this class will result in a warning in Java 11 and an error in Java 17.,1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""useMimeCoder"",""type"":""boolean"",""displayName"":""Use MIME coder"",""description"":""Use `Base64.getMimeEncoder()`/`getMimeDecoder()` instead of `Base64.getEncoder()`/`getDecoder()`."",""example"":""false"",""value"":false}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.UseTabsOrSpaces,Force indentation to either tabs or spaces,"This is useful for one-off migrations of a codebase that has mixed indentation styles, while preserving all other auto-detected formatting rules.",1,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""useTabs"",""type"":""boolean"",""displayName"":""Use tabs"",""description"":""Whether to use tabs for indentation."",""required"":true,""value"":false}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.WasDevMvnChangeParentArtifactId,Change `net.wasdev.maven.parent:java8-parent` to `:parent`,This recipe changes the artifactId of the `` tag in the `pom.xml` from `java8-parent` to `parent`.,2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.awt.JavaAwtAPIs,Use modernized `java.awt` APIs,"Replace calls to AWT and Swing methods deprecated since JDK 1.1 with calls to the methods that replaced them, such as `Component#show()` with `Component#setVisible(true)`.",7,,`java.awt` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -186,9 +186,9 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.g maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$MapsNewTreeMapFromSortedMapRecipe,Prefer `new TreeMap<>(SortedMap)`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$MapsNewTreeMapRecipe,Prefer `new TreeMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$MapsNewTreeMapWithComparatorRecipe,Prefer `new TreeMap<>(Comparator)`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObjectRecipe,`Preconditions.checkNotNull` with `Object` message to `Objects.requireNonNull` with `String.valueOf`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullRecipe,`Preconditions.checkNotNull` with `String` message to `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullToObjectsRequireNonNullRecipe,Replace `Preconditions.checkNotNull` with `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullMessageTypeObjectRecipe,Replace `Preconditions.checkNotNull` taking an `Object` message with `Objects.requireNonNull` and `String.valueOf`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$PreconditionsCheckNotNullWithMessageToObjectsRequireNonNullRecipe,Replace `Preconditions.checkNotNull` taking a `String` message with `Objects.requireNonNull`,Migrate from Guava `Preconditions.checkNotNull` to Java 8 `java.util.Objects.requireNonNull`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$SetsNewConcurrentHashSetRecipe,Prefer `Collections.newSetFromMap(new ConcurrentHashMap<>())`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$SetsNewLinkedHashSetFromCollectionRecipe,Prefer `new LinkedHashSet<>(Collection)`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes$SetsNewLinkedHashSetRecipe,Prefer `new LinkedHashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -198,7 +198,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.g maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaSetsNewConcurrentHashSet,Prefer `new ConcurrentHashMap<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaSetsNewHashSet,Prefer `new HashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet,Prefer `new LinkedHashSet<>()`,Prefer the Java standard library over third-party usage of Guava in simple cases like this.,4,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoMapsAndSetsWithExpectedSize,Prefer JDK methods for Maps and Sets of an expected size,Prefer Java 19+ methods to create Maps and Sets of an expected size instead of using Guava methods.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.NoMapsAndSetsWithExpectedSize,Prefer JDK methods for Maps and Sets of an expected size,"Replace Guava's `Maps.newHashMapWithExpectedSize(int)`, `Maps.newLinkedHashMapWithExpectedSize(int)`, `Sets.newHashSetWithExpectedSize(int)` and `Sets.newLinkedHashSetWithExpectedSize(int)` with the JDK `HashMap`, `LinkedHashMap`, `HashSet` and `LinkedHashSet` constructors.",1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferCharCompare,Prefer `Character#compare`,Prefer `java.lang.Character#compare` instead of using `com.google.common.primitives.Chars#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferIntegerCompare,Prefer `Integer#compare`,Prefer `java.lang.Integer#compare` instead of using `com.google.common.primitives.Ints#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferIntegerCompareUnsigned,Prefer `Integer#compareUnsigned`,Prefer `java.lang.Integer#compareUnsigned` instead of using `com.google.common.primitives.UnsignedInts#compare`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -215,7 +215,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.g maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsRequireNonNullElse,Prefer `java.util.Objects#requireNonNullElse`,Prefer `java.util.Objects#requireNonNullElse` instead of using `com.google.common.base.MoreObjects#firstNonNull`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilOptional,Prefer `java.util.Optional`,Prefer `java.util.Optional` instead of using `com.google.common.base.Optional`.,12,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrElseNull,Prefer `java.util.Optional#orElse(null)` over `com.google.common.base.Optional#orNull()`,Replaces `com.google.common.base.Optional#orNull()` with `java.util.Optional#orElse(null)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier,Prefer `java.util.Optional#or(Supplier>)`,Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional).,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier,Prefer `java.util.Optional#or(Supplier>)`,Prefer `java.util.Optional#or(Supplier>)` over `com.google.common.base.Optional#or(com.google.common.base.Optional)`.,1,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilPredicate,Prefer `java.util.function.Predicate`,Prefer `java.util.function.Predicate` instead of using `com.google.common.base.Predicate`.,3,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferJavaUtilSupplier,Prefer `java.util.function.Supplier`,Prefer `java.util.function.Supplier` instead of using `com.google.common.base.Supplier`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.guava.PreferLongCompare,Prefer `Long#compare`,Prefer `java.lang.Long#compare` instead of using `com.google.common.primitives.Longs#compare`.,2,,Guava,Modernize,Java,,Recipes for migrating from [Google Guava](https://github.com/google/guava) to Java standard library.,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -239,8 +239,8 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaInjectDependency,Add the jakarta.inject API when needed,Add a standalone API only when no explicitly provided API or full platform already supplies it.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaMailDependency,Add the Jakarta Mail API when needed,Add the migrated API without promoting an explicitly provided or compile-only dependency.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaRestDependency,Add the jakarta.ws.rs API when needed,Add a standalone API only when no explicitly provided API or full platform already supplies it.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaXmlBindRuntime,Add a Jakarta JAXB runtime for Maven applications,Add a Jakarta JAXB 3 runtime when a Maven module calls JAXBContext.newInstance and has no explicit JAXB provider or provided Jakarta platform. Java 8's built-in javax provider cannot serve Jakarta calls. Annotation-only modules are left alone and test-only calls receive a test dependency.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ApplicationPathWildcardNoLongerAccepted,Remove trailing slash from `jakarta.ws.rs.ApplicationPath` values,Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.AddJakartaXmlBindRuntime,Add a Jakarta JAXB runtime for Maven applications,Add a Jakarta JAXB 3 runtime when a Maven module calls `JAXBContext.newInstance` and has no explicit JAXB provider or provided Jakarta platform. Java 8's built-in `javax` provider cannot serve Jakarta calls. Annotation-only modules are left alone and test-only calls receive a test dependency.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ApplicationPathWildcardNoLongerAccepted,Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values,Remove trailing `/*` from `jakarta.ws.rs.ApplicationPath` values.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ChangeJaxbApiDependency,Migrate the JAXB API dependency unless Recorder or Jackson still needs it,Migrate JAXB API coordinates while preserving the legacy API needed alongside Jakarta JAXB by external Arquillian Recorder 1.x binaries or by Jackson's JAXB annotations module. Recorder modules migrated in the same reactor are excluded.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.DeprecatedCDIAPIsRemoved40,Remove deprecated API's not supported in CDI4.0,Deprecated APIs have been removed in CDI 4.0. This recipe removes and updates the corresponding deprecated methods.,4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.DoesNotHaveProvidedApiDependency,Build does not declare a provided API dependency,"Find build files without an explicitly provided or compile-only API, so adding a compile dependency does not promote a container-provided API to runtime scope.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""coordinates"",""type"":""List"",""displayName"":""API coordinates"",""description"":""Legacy and Jakarta groupId:artifactId coordinates whose provided scope must be preserved."",""example"":""javax.enterprise:cdi-api, jakarta.enterprise:jakarta.enterprise.cdi-api"",""required"":true}]", @@ -253,7 +253,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.FileuploadToFileUpload2,Migrate `commons-fileupload` to `commons-fileupload2-jakarta-servlet5`,"Migrate Apache Commons FileUpload 1.x and the `commons-fileupload2-jakarta` milestone to `commons-fileupload2-jakarta-servlet5`, moving `org.apache.commons.fileupload` packages and servlet types to their FileUpload 2 equivalents.",10,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.HasJettyDependency,Build uses Jetty before version 12,Mark the source set when a Maven or Gradle module depends on servlet or WebSocket artifacts relocated by the Jetty 12 migration. This permits updating the Java baseline in parent build files as well as the module using Jetty.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.HasNoJakartaAnnotations,Project has no Jakarta annotations,Mark all source as found per `JavaProject` where no Jakarta annotations are found. This is useful mostly as a precondition for recipes that require Jakarta annotations to be present.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.InvocationContextGetConstructor,Complete InvocationContext decorators,Delegate getConstructor() when a legacy InvocationContext wrapper delegates getMethod().,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.InvocationContextGetConstructor,Complete `InvocationContext` decorators,Delegate `getConstructor()` when a legacy `InvocationContext` wrapper delegates `getMethod()`.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta,Migrate Jackson from javax to jakarta namespace,Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts that are compatible with Jakarta EE 9.,27,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JacksonProviderOverrides,Migrate Jackson provider configuration overrides,Add and forward the default view parameter required by Jakarta Jackson providers.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.JakartaEE10,Migrate to Jakarta EE 10,"These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.",682,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" @@ -318,7 +318,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.MigrationToJakarta10Apis,Migrate Jakarta EE 9 api dependencies to Jakarta EE 10 versions,Jakarta EE 10 updates some apis compared to Jakarta EE 9.,32,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration,OmniFaces Namespace Migration,Find and replace legacy OmniFaces namespaces.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemovalsServletJakarta10,Replace deprecated Jakarta Servlet methods and classes,This recipe replaces the classes and methods deprecated in Jakarta Servlet 6.0.,18,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemoveBeanIsNullable,Remove `Bean.isNullable()`,"`Bean.isNullable()` has been removed in CDI 4.0.0, and now always returns `false`.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemoveBeanIsNullable,Remove `Bean.isNullable()`,"`Bean.isNullable()` was deprecated in CDI 1.1, after which implementations should always return `false`, and was removed in CDI 4.0. Replace calls with `false` and simplify the resulting conditionals.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemoveJakartaAnnotationDependencyWhenManagedBySpringBoot,Remove `jakarta.annotation-api` dependency when managed by Spring Boot,Best practice recipe to cleanup a direct dependency which also comes transitively for Spring Boot applications.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemovedIsParmetersProvidedMethod,Use `isParametersProvided()`,"Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method, with the word 'parameter' misspelled in the method name. This method is unavailable in Jakarta Expression Language 5.0. Use the correctly spelled MethodExpression.isParametersProvided() method instead.",2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemovedJakartaFacesExpressionLanguageClasses,Use `jakarta.el` instead of `jakarta.faces.el` and `javax.faces.el`,Several classes were removed and replaced in Jakarta Faces 3.0. The only Object definition not removed in the `jakarta.faces.el` package is the CompositeComponentExpressionHolder interface.,17,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -328,18 +328,18 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RemovedUIComponentConstant,Replace `CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` with `getCurrentComponent()` and `getCurrentCompositeComponent()`,"Replace lookups of the `jakarta.faces.component.UIComponent.CURRENT_COMPONENT` and `CURRENT_COMPOSITE_COMPONENT` keys in the `FacesContext` attributes with `UIComponent.getCurrentComponent(FacesContext)` and `UIComponent.getCurrentCompositeComponent(FacesContext)`, which were added in JSF 2.0.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ReplaceJakartaJwsWithJakartaXmlWs,Replace `jakarta.jws-api` with `jakarta.xml.ws-api`,"Starting with Jakarta EE 10, the standalone `jakarta.jws-api` artifact was retired and its content was merged into `jakarta.xml.ws-api`. This recipe replaces a declared `jakarta.jws:jakarta.jws-api` dependency in place with `jakarta.xml.ws:jakarta.xml.ws-api`, and adds `jakarta.xml.ws:jakarta.xml.ws-api` directly when `jakarta.jws` was only available transitively.",3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RestAssuredJavaxToJakarta,Migrate RestAssured from javax to jakarta namespace by upgrading to a version compatible with J2EE9,Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their counterparts that are compatible with Jakarta EE 9.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RetainJaxbApiForArquillianRecorder,Retain the JAXB 2 API for Arquillian Recorder 1.x,"Retain the legacy JAXB API in Maven modules using Arquillian Recorder 1.x binaries, which still reference javax.xml.bind classes after the application's Jakarta migration.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RetainJaxbApiForArquillianRecorder,Retain the JAXB 2 API for Arquillian Recorder 1.x,"Retain the legacy JAXB API in Maven modules using Arquillian Recorder 1.x binaries, which still reference `javax.xml.bind` classes after the application's Jakarta migration.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.RetainJaxbApiForJackson,Retain `javax.xml.bind:jaxb-api` when `jackson-module-jaxb-annotations` is present,"When migrating from `javax.xml.bind` to `jakarta.xml.bind` 3.0+, the `javax.xml.bind:jaxb-api` dependency is normally replaced. However, if `jackson-module-jaxb-annotations` is on the classpath (and still uses the `javax.xml.bind` namespace), this recipe ensures `javax.xml.bind:jaxb-api` remains available as a runtime dependency to prevent `NoClassDefFoundError`.",2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265,Remove `getComment` and `getVersion` methods,"Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265. In addition, the behavior of these methods has been changed so the setters no longer have any effect, the getComment methods return null, and the getVersion method returns 0. The deprecated methods are removed.",7,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateAddAnnotatedTypes,"Replace `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` with `addAnnotatedType(AnnotatedType, String)`","`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is Replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateAnnotationAttributeJavaxToJakarta,Update annotation attributes using `javax` to `jakarta`,Replace `javax` with `jakarta` in annotation attributes for matching annotation signatures.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""signature"",""type"":""String"",""displayName"":""Annotation signature"",""description"":""An annotation signature to match."",""example"":""@javax.jms..*""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateAddAnnotatedTypes,"Replace `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` with `addAnnotatedType(AnnotatedType, String)`","`BeforeBeanDiscovery.addAnnotatedType(AnnotatedType)` is deprecated in CDI 1.1. It is replaced by `BeforeBeanDiscovery.addAnnotatedType(AnnotatedType, String)`.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateAnnotationAttributeJavaxToJakarta,Update annotation attributes using `javax` to `jakarta`,Replace `javax` with `jakarta` in annotation attributes for matching annotation signatures.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""signature"",""type"":""String"",""displayName"":""Annotation signature"",""description"":""An annotation signature to match."",""example"":""@jakarta.jms..*"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateApacheCommonsEmailDependencies,Update Apache Commons Email to Email2 for Jakarta,Update Apache Commons Email to Email2 for Jakarta.,6,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateApacheShiroDependencies,Update Apache Shiro Dependencies to 2.0.x,Update Apache Shiro Dependencies to 2.0.x.,11,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateApacheWSSecurityPackages,Migrate `org.apache.ws.security` and `org.apache.ws.security.components.crypto` packages to `org.apache.wss4j.common.ext` and `org.apache.wss4j.common.crypto` packages,Java EE has been rebranded to Jakarta EE. This recipe replaces Apache security packages to migrate to Apache `wss4j`.,21,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateBeanManagerMethods,Update `fireEvent()` and `createInjectionTarget()` calls,Updates `BeanManager.fireEvent()` or `BeanManager.createInjectionTarget()`.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateEclipseLinkDependencies,Update EclipseLink Dependencies to 4.x,Update EclipseLink Dependencies to 4.x.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateFileupload2Dependencies,Update Apache Commons FileUpload2 package for EE10,Update Apache Commons FileUpload2 package for EE10.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateGetRealPath,Updates `getRealPath()` to call `getContext()` followed by `getRealPath()`,Updates `getRealPath()` for `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` to use `ServletContext.getRealPath(String)`.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateGetRealPath,Replace `ServletRequest.getRealPath(String)` with `getServletContext().getRealPath(String)`,Replace the removed `getRealPath(String)` on `jakarta.servlet.ServletRequest` and `jakarta.servlet.ServletRequestWrapper` with `getServletContext().getRealPath(String)`.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaAnnotations2,Update Jakarta EE annotation Dependencies to 2.1.x,Update Jakarta EE annotation Dependencies to 2.1.x.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi3,Migrate deprecated `javax.faces` packages to `jakarta.faces`,"Java EE has been rebranded to Jakarta EE, necessitating a package relocation and upgrade.",8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi4,Update Jakarta EE Java Faces Dependencies to 4.0.x,Update Jakarta EE Java Faces Dependencies to 4.0.x.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -348,7 +348,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaPlatform11,Update Jakarta EE Platform Dependencies to 11.0.x,Update Jakarta EE Platform Dependencies to 11.0.x.,4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJakartaXmlWsEE10,Update Jakarta EE XML Web Services Dependencies for EE 10,Update Jakarta EE XML Web Services Dependencies for EE 10.,8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateJerseyDependencies,Update GlassFish Jersey Dependencies to 3.1.x,Update GlassFish Jersey Dependencies to 3.1.x.,8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed,Update Faces `@ManagedBean` to use CDI `@Named`,Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace `@ManagedBean` with `@Named` for CDI-based bean management.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed,Update Faces `@ManagedBean` to use CDI `@Named`,Faces `@ManagedBean` was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace `@ManagedBean` with `@Named` for CDI-based bean management.,1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateRestLet2_6,Update RestLet to 2.6.0,Update RestLet to 2.6.0.,4,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpdateYassonDependencies,Update Eclipse Yasson Dependencies to 3.0.x,Update Eclipse Yasson Dependencies to 3.0.x.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.",8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -356,7 +356,7 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries,Upgrade Faces open source libraries,"Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.",8,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeJavaForJetty12,Use Java 17 for Jetty 12,Update the Java baseline of builds using Jetty to the minimum required by Jetty 12.,11,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeJettyCoreDependencies,Align legacy Jetty core dependencies with Jetty 12,Upgrade explicitly declared Jetty core dependencies alongside the relocated servlet dependencies.,2,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeMavenEjbPluginConfiguration,Set `maven-ejb-plugin` ejbVersion to 4.0,"Updates the `` configuration of `maven-ejb-plugin` to `4.0` when the current value (or its resolved Maven property) indicates EJB 3.x. Handles the common pattern where `` is coupled to the `javax.ejb-api` dependency version via a shared property, decoupling them after migration.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.UpgradeMavenEjbPluginConfiguration,Set `maven-ejb-plugin` `ejbVersion` to `4.0`,"Updates the `` configuration of `maven-ejb-plugin` to `4.0` when the current value (or its resolved Maven property) indicates EJB 3.x. Handles the common pattern where `` is coupled to the `javax.ejb-api` dependency version via a shared property, decoupling them after migration.",1,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.WeldToJakarta,Migrate Weld implementations to Jakarta CDI,"Replace legacy Weld core artifacts and upgrade javax-based Weld implementations to Weld 4, which implements Jakarta CDI 3.",3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jakarta.WsWsocServerContainerDeprecation,Replace `doUpgrade(..)` with `ServerContainer.upgradeHttpToWebSocket(..)`,Deprecated `WsWsocServerContainer.doUpgrade(..)` is replaced by the Jakarta WebSocket 2.1 specification `ServerContainer.upgradeHttpToWebSocket(..)`.,3,,Jakarta,Modernize,Java,,Recipes for migrating to [Jakarta EE](https://jakarta.ee/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javaee6,Migrate to JavaEE6,"These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.",2,,,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -367,26 +367,23 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javaee8.MigrateToServlet3x,Update Java EE Servlet Dependencies to 3.x,Update Java EE Servlet Dependencies to 3.x.,2,,Java EE 8,Modernize,Java,,Recipes for migrating to [Java EE 8](https://javaee.github.io/javaee-spec/javadocs/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javaee8.ServletIsRequestedSessionIdFromURL,Replace `HttpServletRequestWrapper.isRequestedSessionIdFromUrl()` with `isRequestedSessionIdFromURL()`,The method `HttpServletRequestWrapper.isRequestedSessionIdFromUrl()` is deprecated in JavaEE8 and is replaced by `HttpServletRequestWrapper.isRequestedSessionIdFromURL()`.,2,,Java EE 8,Modernize,Java,,Recipes for migrating to [Java EE 8](https://javaee.github.io/javaee-spec/javadocs/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddApiDependencyForImports,Add an API dependency for explicit imports,"Add an API dependency to the nearest Maven module importing the package, including imports whose types could not be resolved by the parser because the JDK used to provide them. A module that already has the API in the needed scope, or from a dependency it declares as provided, is left alone.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""packageName"",""type"":""String"",""displayName"":""Package name"",""description"":""The package whose imports need the API. A `jakarta` package also matches imports of its `javax` predecessor."",""example"":""jakarta.xml.bind"",""required"":true},{""name"":""groupId"",""type"":""String"",""displayName"":""Group ID"",""description"":""The group ID of the API dependency."",""example"":""jakarta.xml.bind"",""required"":true},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact ID"",""description"":""The artifact ID of the API dependency."",""example"":""jakarta.xml.bind-api"",""required"":true},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the API dependency to add."",""example"":""3.0.x"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddColumnAnnotation,`@ElementCollection` annotations must be accompanied by a defined `@Column` annotation,"When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute -ID and value. In OpenJPA, the column for the annotated attribute is named element, whereas EclipseLink names the column based on -the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a `@Column` annotation with the name -attribute set to element.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddColumnAnnotation,Set `@Column(name = "element")` on `@ElementCollection` attributes,"When an attribute is annotated with `@ElementCollection`, a separate table is created for the attribute that includes the attribute ID and value. In OpenJPA, the column for the annotated attribute is named `element`, whereas EclipseLink names the column based on the name of the attribute. To remain compatible with tables that were created with OpenJPA, add a `@Column` annotation with the `name` attribute set to `element`.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies,Add explicit Common Annotations dependencies,Add the necessary `annotation-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,12,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddDefaultConstructorToEntityClass,`@Entity` objects with constructors must also have a default constructor,"When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also have a default, no-argument constructor. The OpenJPA implementation automatically generates the no-argument constructor, but the EclipseLink implementation does not.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddDefaultConstructorToEntityClass,Add a default constructor to `@Entity` and `@MappedSuperclass` classes,"When a Java Persistence API (JPA) entity class has a constructor with arguments, the class must also have a default, no-argument constructor. The OpenJPA implementation automatically generates the no-argument constructor, but the EclipseLink implementation does not.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddInjectDependencies,Add explicit Inject dependencies,Add the necessary `inject-api` dependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.,3,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies,Add explicit JAXB API dependencies,This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,14,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime,Add explicit JAXB API dependencies and runtime,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. Running a full javax to Jakarta migration using `org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta` will update to versions greater than 3.x which necessitates the package change as well.,18,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime,Add explicit JAXB API dependencies and remove runtimes,This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the `javax.xml.bind` namespace. All JAXB runtime implementation dependencies are removed.,19,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxbRuntime,Use latest JAXB API and runtime for Jakarta EE 8,"Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAXB API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""runtime"",""type"":""String"",""displayName"":""JAXB run-time"",""description"":""Which implementation of the JAXB run-time that will be added to maven projects that have transitive dependencies on the JAXB API"",""example"":""glassfish"",""valid"":[""glassfish"",""sun""],""required"":true}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxbRuntime,Use latest JAXB API and runtime for Jakarta EE 8,"Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle `runtimeOnly` and Maven `runtime` scope, to any project that uses `javax.xml.bind` and has a transitive dependency on the JAXB API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""runtime"",""type"":""String"",""displayName"":""JAXB run-time"",""description"":""Which implementation of the JAXB run-time to add to projects that have transitive dependencies on the JAXB API."",""example"":""glassfish"",""valid"":[""glassfish"",""sun""],""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsDependencies,Add explicit JAX-WS dependencies,This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the `javax.xml.bind` namespace.,12,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeGradle,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update Gradle build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `compileOnly`+`testImplementation` configurations, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeMaven,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeGradle,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update Gradle build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `compileOnly`+`testImplementation` configurations, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsRuntime$AddJaxwsRuntimeMaven,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update maven build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddJaxwsRuntime,Use the latest JAX-WS API and runtime for Jakarta EE 8,"Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle `compileOnly`+`testImplementation` and Maven `provided` scope, to any project that has a transitive dependency on the JAX-WS API. **The resulting dependencies still use the `javax` namespace, despite the move to the Jakarta artifact**.",3,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddScopeToInjectedClass,Add scope annotation to injected classes,Finds member variables annotated with `@Inject' and applies `@Dependent` scope annotation to the variable's type.,1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTableGenerator,Attributes with automatically generated values require configuration,Adds missing `@TableGenerator` annotation and updates the `@GeneratedValue` annotation values when it uses automatically generated values.,1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToCollections,Unannotated collection attributes require a Transient annotation,"In OpenJPA, attributes that inherit from the `java.util.Collection` interface are not a default persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a different default behavior and attempts to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated collection attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToEntity,Unannotated entity attributes require a Transient annotation,"In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToPrivateAccessor,Private accessor methods must have a `@Transient` annotation,"According to the JPA 2.1 specification, when property access is used, the property accessor methods must be public or protected. OpenJPA ignores any private accessor methods, whereas EclipseLink persists those attributes. To ignore private accessor methods in EclipseLink, the methods must have a `@Transient` annotation.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddScopeToInjectedClass,Add scope annotation to injected classes,Finds member variables annotated with `@Inject` and applies `@Dependent` scope annotation to the variable's type.,1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTableGenerator,Add a `@TableGenerator` to automatically generated `@GeneratedValue` attributes,Adds missing `@TableGenerator` annotation and updates the `@GeneratedValue` annotation values when it uses automatically generated values.,1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToCollections,Add `@Transient` to unannotated collection attributes,"In OpenJPA, attributes that inherit from the `java.util.Collection` interface are not a default persistent type, so these attributes are not persisted unless they are annotated. EclipseLink has a different default behavior and attempts to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated collection attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToEntity,Add `@Transient` to unannotated entity attributes,"In OpenJPA, attributes that are themselves entity classes are not persisted by default. EclipseLink has a different default behavior and tries to persist these attributes to the database. To keep the OpenJPA behavior of ignoring unannotated entity attributes, add the `javax.persistence.Transient` annotation to these attributes in EclipseLink.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.AddTransientAnnotationToPrivateAccessor,Add `@Transient` to private accessor methods,"According to the JPA 2.1 specification, when property access is used, the property accessor methods must be public or protected. OpenJPA ignores any private accessor methods, whereas EclipseLink persists those attributes. To ignore private accessor methods in EclipseLink, the methods must have a `@Transient` annotation.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.HttpSessionInvalidate,Call `HttpServletRequest.logout()` before `HttpSession.invalidate()`,"Add a call to `HttpServletRequest#logout()`, introduced in Servlet 3.0, before `HttpSession#invalidate()`, so that a programmatic logout also clears the authenticated user, not only the session. Only applies to standalone `invalidate()` statements in methods with an `HttpServletRequest` parameter where the `ServletException` thrown by `logout()` is already declared or caught.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.JavaxLangModelUtil,Use modernized `javax.lang.model.util` APIs,"Certain `javax.lang.model.util` APIs have become deprecated and their usages changed, necessitating usage changes.",19,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.JavaxManagementMonitorAPIs,Use modernized `javax.management.monitor` APIs,"Certain `javax.management.monitor` APIs have become deprecated and their usages changed, necessitating usage changes.",3,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -406,9 +403,9 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.j maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.MigrateXMLEventFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLEventFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLEventFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLEventFactory#newInstance` in Java 7 or higher.,2,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.MigrateXMLInputFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLInputFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLInputFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLInputFactory#newInstance` in Java 7 or higher.,2,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.MigrateXMLOutputFactoryNewInstanceToNewFactory,"Use `javax.xml.stream.XMLOutputFactory#newFactory(String, ClassLoader)`",Use `javax.xml.stream.XMLOutputFactory#newFactory` instead of the deprecated `javax.xml.stream.XMLOutputFactory#newInstance` in Java 7 or higher.,2,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.RemoveEmbeddableId,`@Embeddable` classes cannot have an `@Id` annotation when referenced by an `@EmbeddedId` annotation,"According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an `@EmbeddedId` annotation, the embeddable class cannot contain an attribute with an `@Id` annotation. If both the `@EmbeddedId` annotation and the `@Id` annotation are defined, OpenJPA ignores the `@Id` annotation, whereas EclipseLink throws an exception.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.RemoveEmbeddableId,Remove `@Id` from `@Embeddable` classes referenced by an `@EmbeddedId`,"According to the Java Persistence API (JPA) specification, if an entity defines an attribute with an `@EmbeddedId` annotation, the embeddable class cannot contain an attribute with an `@Id` annotation. If both the `@EmbeddedId` annotation and the `@Id` annotation are defined, OpenJPA ignores the `@Id` annotation, whereas EclipseLink throws an exception.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.RemoveTemporalAnnotation,Remove the `@Temporal` annotation for some `java.sql` attributes,"OpenJPA persists the fields of attributes of type `java.sql.Date`, `java.sql.Time`, or `java.sql.Timestamp` that have a `javax.persistence.Temporal` annotation, whereas EclipseLink throws an exception. Remove the `@Temporal` annotation so the behavior in EclipseLink will match the behavior in OpenJPA.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.UseJoinColumnForMapping,`@JoinColumn` annotations must be used with relationship mappings,"In OpenJPA, when a relationship attribute has either a `@OneToOne` or a `@ManyToOne` annotation with a `@Column` annotation, the `@Column` annotation is treated as a `@JoinColumn` annotation. EclipseLink throws an exception that indicates that the entity class must use `@JoinColumn` instead of `@Column` to map a relationship attribute.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.UseJoinColumnForMapping,Replace `@Column` with `@JoinColumn` on relationship mappings,"In OpenJPA, when a relationship attribute has either a `@OneToOne` or a `@ManyToOne` annotation with a `@Column` annotation, the `@Column` annotation is treated as a `@JoinColumn` annotation. EclipseLink throws an exception that indicates that the entity class must use `@JoinColumn` instead of `@Column` to map a relationship attribute.",1,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.javax.openJPAToEclipseLink,Migrate from OpenJPA to EclipseLink JPA,These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.,10,,`javax` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jspecify.MoveAnnotationToArrayType,Move annotation to array type,"When an annotation like `@Nullable` is applied to an array type in declaration position, this recipe moves it to the array brackets. For example, `@Nullable byte[]` becomes `byte @Nullable[]`. Best used before `ChangeType` in a migration pipeline, targeting the pre-migration annotation type.",1,,Jspecify,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""annotationType"",""type"":""String"",""displayName"":""Annotation type"",""description"":""The type of annotation to move to the array type. Should target the pre-migration annotation type to avoid changing the semantics of pre-existing type-use annotations on object arrays."",""example"":""javax.annotation.*ull*"",""required"":true}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.jspecify.RemoveAnnotationFromVoidMethod,Remove annotation from `void` method,"Nullability annotations are meaningless on methods returning `void`, and type-use annotations such as JSpecify's `@Nullable` are not permitted there. This recipe removes such annotations so they are not carried over by a later `ChangeType`.",1,,Jspecify,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""annotationType"",""type"":""String"",""displayName"":""Annotation type"",""description"":""The type of annotation to remove from methods returning `void`."",""example"":""org.jetbrains.annotations.*ull*"",""required"":true}]", @@ -419,7 +416,7 @@ This is a strictly behavior-preserving transformation: argument expressions are maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.FindNonVirtualExecutors,Find non-virtual `ExecutorService` creation,Find all places where static `java.util.concurrent.Executors` method creates a non-virtual `java.util.concurrent.ExecutorService`. This recipe can be used to search fro `ExecutorService` that can be replaced by Virtual Thread executor.,7,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.FindThreadStartInConstructor,Find `Thread.start()` calls made during construction of a non-final class,"Finds `Thread.start()` invocations reached during construction of a non-`final` class — from a constructor body, an instance field initializer, or an instance initializer block. Starting a thread before construction completes lets the new thread observe a partially-initialised object; the problem is compounded when a subclass extends the class, because the superclass constructor starts the thread before the subclass' own fields have been initialised. Move the `start()` call to a separate method callers invoke after construction, or declare the class `final`.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.FindVirtualThreadOpportunities,Find Virtual Thread opportunities,Find opportunities to convert existing code to use Virtual Threads.,10,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.IfElseIfConstructToSwitch,If-else-if-else to switch,"Replace if-else-if-else with switch statements. In order to be replaced with a switch, all conditions must be on the same variable and there must be at least three cases.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.IfElseIfConstructToSwitch,Replace if-else-if-else with switch,"Replace if-else-if-else with switch statements. In order to be replaced with a switch, all conditions must be on the same variable and there must be at least three cases.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.JavaLangAPIs,Use modernized `java.lang` APIs,"Certain Java lang APIs have become deprecated and their usages changed, necessitating usage changes.",17,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.JavadocToMarkdownDocComment,Convert Javadoc to Markdown documentation comments,"Convert traditional Javadoc comments (`/** ... */`) to Markdown documentation comments (`///`) as supported by JEP 467 in Java 23+. Transforms HTML constructs like `
`, ``, ``, `

`, and lists to their Markdown equivalents, and converts inline tags like `{@code}` and `{@link}` to Markdown syntax.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.MigrateCharacterIsJavaLetterOrDigitToIsJavaIdentifierPart,Use `Character#isJavaIdentifierPart(char)`,Use `Character#isJavaIdentifierPart(char)` instead of the deprecated `Character#isJavaLetterOrDigit(char)` in Java 1.1 or higher.,2,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -436,24 +433,24 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.l maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.NullCheckAsSwitchCase,Add null check to existing switch cases,"In later Java 21+, null checks are valid in switch cases. This recipe will only add null checks to existing switch cases if there are no other statements in between them or if the block in the if statement is not impacting the flow of the switch.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.RefineSwitchCases,Use switch cases refinement when possible,Use guarded switch case labels and guards if all the statements in the switch block do if/else if/else on the guarded label.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.RenameUnderscoreIdentifier,Rename `_` identifier to `__`,"Renames single-underscore identifiers to double-underscore in Java source files with source compatibility of Java 8 or below. In Java 9+, `_` is a reserved keyword and causes a compile error.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.ReplaceUnusedVariablesWithUnderscore,Replace unused variables with underscore,"Replace unused variable declarations with underscore (_) for Java 22+. This includes unused variables in enhanced for loops, catch blocks, and lambda parameters where the variable is never referenced.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringFormatted,Prefer `String.formatted(Object...)`,"Prefer `String.formatted(Object...)` over `String.format(String, Object...)` in Java 17 or higher.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""addParentheses"",""type"":""Boolean"",""displayName"":""Add parentheses around the first argument"",""description"":""Add parentheses around the first argument if it is not a simple expression. Default true; if false no change will be made. ""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.ReplaceUnusedVariablesWithUnderscore,Replace unused variables with underscore,"Replace unused variable declarations with underscore (`_`) for Java 22+. This includes unused variables in enhanced for loops, catch blocks, and lambda parameters where the variable is never referenced.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringFormatted,Prefer `String.formatted(Object...)`,"Prefer `String.formatted(Object...)` over `String.format(String, Object...)` in Java 17 or higher.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""addParentheses"",""type"":""Boolean"",""displayName"":""Add parentheses around the first argument"",""description"":""Add parentheses around the first argument if it is not a simple expression. Default true; if false, calls whose first argument would need parentheses are left unchanged.""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$IndexOfCharRecipe,"Replace `String.indexOf(char, 0)` with `String.indexOf(char)`","Replace `String.indexOf(char ch, int fromIndex)` with `String.indexOf(char)`.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$IndexOfStringRecipe,"Replace `String.indexOf(String, 0)` with `String.indexOf(String)`","Replace `String.indexOf(String str, int fromIndex)` with `String.indexOf(String)`.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$RedundantCallRecipe,Replace redundant `String` method calls with self,Replace redundant `substring(..)` and `toString()` method calls with the `String` self.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes$UseEqualsIgnoreCaseRecipe,Replace lower and upper case `String` comparisons with `String.equalsIgnoreCase(String)`,Replace `String` equality comparisons involving `.toLowerCase()` or `.toUpperCase()` with `String.equalsIgnoreCase(String anotherString)`.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.StringRulesRecipes,A collection of `String` rules,A collection of rules for refactoring methods called on `String` instances in Java code.,5,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.SwitchCaseAssignmentsToSwitchExpression,Convert assigning Switch statements to Switch expressions,Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. This recipe is only applicable for Java 21 and later.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.SwitchCaseAssignmentsToSwitchExpression,Convert assigning switch statements to switch expressions,Switch statements for which each case is assigning a value to the same variable can be converted to a switch expression that returns the value of the variable. This recipe is only applicable for Java 21 and later.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.SwitchCaseEnumGuardToLabel,Use switch cases labels for enums,Use switch case labels when a guard is checking equality with an enum.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.SwitchCaseReturnsToSwitchExpression,Convert switch cases where every case returns into a returned switch expression,Switch statements where each case returns a value can be converted to a switch expression that returns the value directly. This recipe is only applicable for Java 21 and later.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.SwitchExpressionYieldToArrow,Convert switch expression yield to arrow,Convert switch expressions with colon cases and yield statements to arrow syntax. This recipe is only applicable for Java 21 and later.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.ThreadStopUnsupported,"Replace `Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` with `throw new UnsupportedOperationException()`","`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throws a `new UnsupportedOperationException` in Java 21+. This recipe makes that explicit, as the migration is more complicated. See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html .",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.ThreadStopUnsupported,"Replace `Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` with `throw new UnsupportedOperationException()`","`Thread.resume()`, `Thread.stop()`, and `Thread.suspend()` always throw an `UnsupportedOperationException` in Java 21+. This recipe makes that explicit, and adds a comment pointing to the [migration guide](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html), as the migration is more complicated. On earlier Java versions only the comment is added.",1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.UseStringIsEmptyRecipe,Replace `0 < s.length()` with `!s.isEmpty()`,Replace `0 < s.length()` and `s.length() != 0` with `!s.isEmpty()`.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.UseTextBlocks,Use text blocks,Text blocks are easier to read than concatenated strings.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""convertStringsWithoutNewlines"",""type"":""boolean"",""displayName"":""Whether to convert strings without newlines (the default value is true)."",""description"":""Whether or not strings without newlines should be converted to text block when processing code. The default value is true."",""example"":""true"",""value"":true},{""name"":""avoidLineContinuations"",""type"":""boolean"",""displayName"":""Whether to avoid line continuation escape sequences."",""description"":""When enabled, the recipe avoids using `\\` line continuation escapes in text blocks where the content contains newlines. Non-newline-joined strings are placed on the same text block line instead. The default value is false."",""example"":""true"",""value"":false}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.UseTextBlocks,Use text blocks,Text blocks are easier to read than concatenated strings.,1,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""convertStringsWithoutNewlines"",""type"":""boolean"",""displayName"":""Convert strings without newlines"",""description"":""Whether strings without newlines should be converted to text blocks. The default value is true."",""example"":""true"",""value"":true},{""name"":""avoidLineContinuations"",""type"":""boolean"",""displayName"":""Avoid line continuation escape sequences"",""description"":""When enabled, the recipe avoids using `\\` line continuation escapes in text blocks where the content contains newlines. Non-newline-joined strings are placed on the same text block line instead. The default value is false."",""example"":""true"",""value"":false}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.UseVar,Use local variable type inference,"Apply local variable type inference (`var`) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.",7,,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForConstructors,Use `var` for constructor call assignments,"Replace explicit type declarations with `var` when the variable is initialized with a constructor call of exactly the same type. Does not transform when declared type differs from constructor type (e.g., interface vs implementation).",1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForGenericMethodInvocations,Apply `var` to generic method invocations,"Apply `var` to variables initialized by invocations of generic methods. This recipe ignores generic factory methods without parameters, because open rewrite cannot handle them correctly ATM.",1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForGenericsConstructors,Apply `var` to Generic Constructors,Apply `var` to generics variables initialized by constructor calls.,1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForGenericMethodInvocations,Apply `var` to generic method invocations,"Apply `var` to variables initialized by invocations of generic methods. Invocations with neither type nor method arguments are left alone, as their type arguments are inferred from the declared type, which `var` would lose.",1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForGenericsConstructors,Apply `var` to generic constructors,Apply `var` to generics variables initialized by constructor calls.,1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForObject,Use `var` for reference-typed variables,Try to apply local variable type inference `var` to variables containing Objects where possible. This recipe will not touch variable declarations with generics or initializers containing ternary operators.,1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForPrimitive,Use `var` for primitive and String variables,Try to apply local variable type inference `var` to primitive and String literal variables where possible. This recipe will not touch variable declarations with initializers containing ternary operators.,1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lang.var.UseVarForTypeCast,Use `var` for variables initialized with type casts,"Apply local variable type inference `var` to variables that are initialized by a cast expression where the cast type matches the declared variable type. This removes the redundant type duplication. For example, `String s = (String) obj;` becomes `var s = (String) obj;`.",1,Var,`java.lang` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -482,19 +479,19 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.l maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokBestPractices,Lombok Best Practices,Applies all recipes that enforce best practices for using Lombok.,30,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokOnXToOnX_,Migrate Lombok's `@__` syntax to `onX_` for Java 8+,"Migrates Lombok's `onX` annotations from the Java 7 style using `@__` to the Java 8+ style using `onX_`. For example, `@Getter(onMethod=@__({@Id}))` becomes `@Getter(onMethod_={@Id})`.",1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokValToFinalVar,Prefer `final var` over `lombok.val`,Prefer the Java standard library's `final var` and `var` over third-party usage of Lombok's `lombok.val` and `lombok.var` in Java 10 or higher.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokValueToRecord,Convert `@lombok.Value` class to Record,Convert Lombok `@Value` annotated classes to standard Java Records.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""useExactToString"",""type"":""Boolean"",""displayName"":""Add a `toString()` implementation matching Lombok"",""description"":""When set the `toString` format from Lombok is used in the migrated record.""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.LombokValueToRecord,Convert `@lombok.Value` class to record,Convert Lombok `@Value` annotated classes to standard Java records.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""useExactToString"",""type"":""Boolean"",""displayName"":""Add a `toString()` implementation matching Lombok"",""description"":""When set the `toString` format from Lombok is used in the migrated record.""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UpdateLombokToJava11,Migrate Lombok to a Java 11 compatible version,Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.,11,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UseAllArgsConstructor,Use `@AllArgsConstructor` where applicable,Prefer the Lombok `@AllArgsConstructor` annotation over explicitly written out constructors that assign all non-static fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UseLombokGetter,Convert getter methods to annotations,Convert trivial getter methods to `@Getter` annotations on their respective fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UseLombokSetter,Convert setter methods to annotations,Convert trivial setter methods to `@Setter` annotations on their respective fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UseNoArgsConstructor,Use `@NoArgsConstructor` where applicable,Prefer the Lombok `@NoArgsConstructor` annotation over explicitly written out constructors.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.UseRequiredArgsConstructor,Use `@RequiredArgsConstructor` where applicable,Prefer the Lombok `@RequiredArgsConstructor` annotation over explicitly written out constructors that only assign final fields.,1,,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseCommonsLog,Use `@CommonsLog` instead of explicit fields,Prefer the lombok annotation `@CommonsLog` over explicitly written out `org.apache.commons.logging.Log` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseJBossLog,Use `@JBossLog` instead of explicit fields,Prefer the lombok annotation `@JBossLog` over explicitly written out `org.jboss.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog,Use `@Log` instead of explicit fields,Prefer the lombok annotation `@Log` over explicitly written out `java.util.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog4j2,Use `@Log4j2` instead of explicit fields,Prefer the lombok annotation `@Log4j2` over explicitly written out `org.apache.logging.log4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseCommonsLog,Use `@CommonsLog` instead of explicit fields,Prefer the Lombok annotation `@CommonsLog` over explicitly written out `org.apache.commons.logging.Log` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseJBossLog,Use `@JBossLog` instead of explicit fields,Prefer the Lombok annotation `@JBossLog` over explicitly written out `org.jboss.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog,Use `@Log` instead of explicit fields,Prefer the Lombok annotation `@Log` over explicitly written out `java.util.logging.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLog4j2,Use `@Log4j2` instead of explicit fields,Prefer the Lombok annotation `@Log4j2` over explicitly written out `org.apache.logging.log4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseLombokLogAnnotations,Use Lombok logger annotations instead of explicit fields,Applies all recipes that replace logger declarations with class level annotations.,6,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseSlf4j,Use `@Slf4` instead of explicit fields,Prefer the lombok annotation `@Slf4` over explicitly written out `org.slf4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.lombok.log.UseSlf4j,Use `@Slf4j` instead of explicit fields,Prefer the Lombok annotation `@Slf4j` over explicitly written out `org.slf4j.Logger` fields.,1,Log,Lombok,Modernize,Java,,Recipes for working with [Lombok](https://projectlombok.org/).,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""fieldName"",""type"":""String"",""displayName"":""Name of the log field"",""description"":""Name of the log field to replace. If not specified, the field name is not checked and any field that satisfies the other checks is converted."",""example"":""LOGGER""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.maven.UpdateMavenProjectPropertyJavaVersion,Update Maven Java project properties,"The Java version is determined by several project properties, including: * `java.version` @@ -519,15 +516,15 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.n maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.net.URLConstructorsToNewURI,"Convert `new URL(String, ..)` to `new URI(String, ..).toURL()`","Converts `new URL(String, ..)` constructors to `new URI(String, ..).toURL()`.",1,,`java.net` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.nio.file.PathsGetToPathOf,Replace `Paths.get` with `Path.of`,The `java.nio.file.Paths.get` method was introduced in Java SE 7. The `java.nio.file.Path.of` method was introduced in Java SE 11. This recipe replaces all usages of `Paths.get` with `Path.of` for consistency.,3,File,Nio,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.nio.file.RedundantUtf8Charset,Remove redundant `StandardCharsets.UTF_8` from `java.nio.file.Files` method calls,"The character based `java.nio.file.Files` methods always default to UTF-8, so passing `StandardCharsets.UTF_8` explicitly is redundant and can be removed.",1,File,Nio,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.AboutJavaVersion,Find which Java version is in use,A diagnostic for studying the distribution of Java language version levels (both source and target compatibility across files and source sets).,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""whenUsesType"",""type"":""String"",""description"":""Only mark the Java version when this type is in use."",""example"":""lombok.val""}]","[{""name"":""org.openrewrite.java.migrate.table.JavaVersionPerSourceSet"",""displayName"":""Java versions by source set"",""instanceName"":""Java versions by source set"",""description"":""A per-source set view of Java version in use."",""columns"":[{""name"":""projectName"",""type"":""String"",""displayName"":""Project name"",""description"":""The module name (useful especially for multi-module repositories).""},{""name"":""sourceSetName"",""type"":""String"",""displayName"":""Source set name"",""description"":""The source set, e.g. `main` or `test`.""},{""name"":""createdBy"",""type"":""String"",""displayName"":""Created by"",""description"":""The JDK release that was used to compile the source file.""},{""name"":""vmVendor"",""type"":""String"",""displayName"":""VM vendor"",""description"":""The vendor of the JVM that was used to compile the source file.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""String"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""}]}]" +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.AboutJavaVersion,Find which Java version is in use,A diagnostic for studying the distribution of Java language version levels (both source and target compatibility across files and source sets).,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""whenUsesType"",""type"":""String"",""displayName"":""When uses type"",""description"":""Only mark the Java version when this type is in use."",""example"":""lombok.val""}]","[{""name"":""org.openrewrite.java.migrate.table.JavaVersionPerSourceSet"",""displayName"":""Java versions by source set"",""instanceName"":""Java versions by source set"",""description"":""A per-source set view of Java version in use."",""columns"":[{""name"":""projectName"",""type"":""String"",""displayName"":""Project name"",""description"":""The module name (useful especially for multi-module repositories).""},{""name"":""sourceSetName"",""type"":""String"",""displayName"":""Source set name"",""description"":""The source set, e.g. `main` or `test`.""},{""name"":""createdBy"",""type"":""String"",""displayName"":""Created by"",""description"":""The JDK release that was used to compile the source file.""},{""name"":""vmVendor"",""type"":""String"",""displayName"":""VM vendor"",""description"":""The vendor of the JVM that was used to compile the source file.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""String"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindCompletableFutureDefaultExecutor,Find `CompletableFuture` async calls without an `Executor`,"Finds `CompletableFuture` and `CompletionStage` `*Async` calls that don't pass an `Executor`, and `CompletableFuture.delayedExecutor` calls without a base `Executor`. These run on `ForkJoinPool.commonPool()`. Before JDK 25, a common pool with parallelism of 1 or less (e.g. on a 2-CPU host) made `CompletableFuture` fall back to a new thread per task; from JDK 25 that fallback is gone, so blocking work queues behind a single worker thread. Calls that pass `ForkJoinPool.commonPool()` explicitly are also found, because they got the same fallback before JDK 25. Review each call and pass a dedicated `Executor` where the task blocks.",1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindDataUsedOnDto,Find data used on DTOs,Find data elements used on DTOs. This is useful to provide information where data over-fetching may be a problem.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""com.example.dto.*"",""required"":true}]","[{""name"":""org.openrewrite.java.migrate.table.DtoDataUses"",""displayName"":""Uses of the data elements of a DTO"",""instanceName"":""Uses of the data elements of a DTO"",""description"":""The use of the data elements of a DTO by the method declaration using it.""}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindDtoOverfetching,Find methods that only use one DTO data element,Find methods that have 'opportunities' for improvement.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""dtoType"",""type"":""String"",""displayName"":""DTO type"",""description"":""The fully qualified name of the DTO."",""example"":""com.example.dto.*"",""required"":true}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindInternalJavaxApis,Find uses of internal javax APIs,The libraries that define these APIs will have to be migrated before any of the repositories that use them.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""Optionally limit the search to declarations that match the provided method pattern."",""example"":""java.util.List add(..)""}]","[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindInternalJavaxApis,Find uses of internal `javax` APIs,The libraries that define these APIs will have to be migrated before any of the repositories that use them.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""methodPattern"",""type"":""String"",""displayName"":""Method pattern"",""description"":""Optionally limit the search to declarations that match the provided method pattern."",""example"":""java.util.List add(..)""}]","[{""name"":""org.openrewrite.java.table.MethodCalls"",""displayName"":""Method calls"",""instanceName"":""Method calls"",""description"":""The text of matching method invocations."",""columns"":[{""name"":""sourceFile"",""type"":""String"",""displayName"":""Source file"",""description"":""The source file that the method call occurred in.""},{""name"":""method"",""type"":""String"",""displayName"":""Method call"",""description"":""The text of the method call.""},{""name"":""className"",""type"":""String"",""displayName"":""Class name"",""description"":""The class name of the method call.""},{""name"":""methodName"",""type"":""String"",""displayName"":""Method name"",""description"":""The method name of the method call.""},{""name"":""argumentTypes"",""type"":""String"",""displayName"":""Argument types"",""description"":""The argument types of the method call.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindJavaVersion,Find Java versions in use,"Finds Java versions in use, emitting one row per git repository (the lowest source/target compatibility across modules in that repository).",1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.migrate.table.JavaVersionTable"",""displayName"":""Java version table"",""instanceName"":""Java version table"",""description"":""Records versions of Java in use"",""columns"":[{""name"":""sourceVersion"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The major version of Java used to compile the source code""},{""name"":""targetVersion"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The major version of Java the bytecode is compiled to run on""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.FindLocaleDateTimeFormats,Find locale-sensitive date/time formatting,"Finds usages of locale-based date/time formatting APIs that may be affected by JDK 20+ CLDR locale data changes, where the space before AM/PM was changed from a regular space to a narrow no-break space (NNBSP).",1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.ModuleHasKotlinSource,Module has Kotlin source files,"Marks all files in modules that contain at least one Kotlin source file (`.kt`). Intended as a precondition to scope recipes to projects that actually compile Kotlin, as opposed to projects that merely pick up `kotlin-stdlib` transitively.",1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""invertMarking"",""type"":""Boolean"",""displayName"":""Invert marking"",""description"":""If `true`, marks files in modules that do *not* contain Kotlin sources. Defaults to `false`.""}]", -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.PlanJavaMigration,Plan a Java version migration,Study the set of Java versions and associated tools in use across many repositories.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.migrate.table.JavaVersionMigrationPlan"",""displayName"":""Java version migration plan"",""instanceName"":""Java version migration plan"",""description"":""A per-repository view of the current state of Java versions and associated build tools"",""columns"":[{""name"":""hasJava"",""type"":""boolean"",""displayName"":""Has Java"",""description"":""Whether this is a Java repository at all.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""Integer"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""},{""name"":""gradleVersion"",""type"":""String"",""displayName"":""Gradle version"",""description"":""The version of Gradle in use, if any.""},{""name"":""hasGradleBuild"",""type"":""Boolean"",""displayName"":""Has Gradle build"",""description"":""Whether a build.gradle file exists in the repository.""},{""name"":""mavenVersion"",""type"":""String"",""displayName"":""Maven version"",""description"":""The version of Maven in use, if any.""},{""name"":""hasMavenPom"",""type"":""Boolean"",""displayName"":""Has Maven pom"",""description"":""Whether a pom.xml file exists in the repository.""}]}]" +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.search.PlanJavaMigration,Plan a Java version migration,Study the set of Java versions and associated tools in use across many repositories.,1,,Search,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,,"[{""name"":""org.openrewrite.java.migrate.table.JavaVersionMigrationPlan"",""displayName"":""Java version migration plan"",""instanceName"":""Java version migration plan"",""description"":""A per-repository view of the current state of Java versions and associated build tools"",""columns"":[{""name"":""hasJava"",""type"":""boolean"",""displayName"":""Has Java"",""description"":""Whether this is a Java repository at all.""},{""name"":""sourceCompatibility"",""type"":""String"",""displayName"":""Source compatibility"",""description"":""The source compatibility of the source file.""},{""name"":""majorVersionSourceCompatibility"",""type"":""Integer"",""displayName"":""Major version source compatibility"",""description"":""The major version.""},{""name"":""targetCompatibility"",""type"":""String"",""displayName"":""Target compatibility"",""description"":""The target compatibility or `--release` version of the source file.""},{""name"":""gradleVersion"",""type"":""String"",""displayName"":""Gradle version"",""description"":""The version of Gradle in use, if any.""},{""name"":""hasGradleBuild"",""type"":""Boolean"",""displayName"":""Has Gradle build"",""description"":""Whether a `build.gradle` file exists in the repository.""},{""name"":""mavenVersion"",""type"":""String"",""displayName"":""Maven version"",""description"":""The version of Maven in use, if any.""},{""name"":""hasMavenPom"",""type"":""Boolean"",""displayName"":""Has Maven pom"",""description"":""Whether a `pom.xml` file exists in the repository.""}]}]" maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.sql.JavaSqlAPIs,Use modernized `java.sql` APIs,"Certain Java sql APIs have become deprecated and their usages changed, necessitating usage changes.",2,,`java.sql` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.sql.MigrateDriverManagerSetLogStream,Use `DriverManager#setLogWriter(java.io.PrintWriter)`,Use `DriverManager#setLogWriter(java.io.PrintWriter)` instead of the deprecated `DriverManager#setLogStream(java.io.PrintStream)` in Java 1.2 or higher.,1,,`java.sql` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.IteratorNext,Replace `iterator().next()` with `getFirst()`,Replace `SequencedCollection.iterator().next()` with `getFirst()`.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, @@ -539,19 +536,19 @@ maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.u maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsSingletonList,Prefer `List.of(..)`,"Prefer `List.of(..)` instead of using `Collections.singletonList()` in Java 9 or higher. Note that the resulting `List` is not behaviorally equivalent: `List.of(..)` throws `NullPointerException` when probed with `contains(null)`, `indexOf(null)`, or `lastIndexOf(null)`, whereas `Collections.singletonList(..)` returns `false`/`-1`.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsSingletonMap,Prefer `Map.of(..)`,"Prefer `Map.of(..)` instead of using `Collections.singletonMap()` in Java 9 or higher. Note that the resulting `Map` is not behaviorally equivalent: `Map.of(..)` throws `NullPointerException` when probed with `containsKey(null)`, `containsValue(null)`, or `get(null)`, whereas `Collections.singletonMap(..)` returns `false`/`null`.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsSingletonSet,Prefer `Set.of(..)`,"Prefer `Set.of(..)` instead of using `Collections.singleton()` in Java 9 or higher. Note that the resulting `Set` is not behaviorally equivalent: `Set.of(..)` throws `NullPointerException` when probed with `contains(null)`, whereas `Collections.singleton(..)` returns `false`.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableList,Prefer `List.of(..)`,Prefer `List.Of(..)` instead of using `unmodifiableList(java.util.Arrays asList())` in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableSet,Prefer `Set.of(..)`,Prefer `Set.Of(..)` instead of using `unmodifiableSet(java.util.Set(java.util.Arrays asList()))` in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableList,Prefer `List.of(..)`,Prefer `List.of(..)` instead of using `Collections.unmodifiableList(Arrays.asList(..))` in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableSet,Prefer `Set.of(..)`,Prefer `Set.of(..)` instead of using `Collections.unmodifiableSet(new HashSet<>(Arrays.asList(..)))` in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateInflaterDeflaterToClose,Replace `Inflater` and `Deflater` `end()` calls with `close()`,"Replace `end()` method calls with `close()` method calls for `Inflater` and `Deflater` classes in Java 25+, as they now implement AutoCloseable.",3,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.MigrateStringReaderToReaderOf,Use `Reader.of(CharSequence)` for non-synchronized readers,Migrate `new StringReader(String)` to `Reader.of(CharSequence)` in Java 25+. This only applies when assigning to `Reader` variables or returning from methods that return `Reader`. The new method creates non-synchronized readers which are more efficient when thread-safety is not required.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.OptionalNotEmptyToIsPresent,Prefer `Optional.isPresent()`,Prefer `Optional.isPresent()` instead of using `!Optional.isEmpty()` in Java 11 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.OptionalNotPresentToIsEmpty,Prefer `Optional.isEmpty()`,Prefer `Optional.isEmpty()` instead of using `!Optional.isPresent()` in Java 11 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.OptionalStreamRecipe,`Stream` idiom recipe,Migrate Java 8 `Optional.filter(Optional::isPresent).map(Optional::get)` to Java 11 `.flatMap(Optional::stream)`.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.RemoveFinalizerFromZip,"Remove invocations of deprecated invocations from Deflater, Inflater, ZipFile","Remove invocations of finalize() deprecated invocations from Deflater, Inflater, ZipFile.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.ReplaceMathRandomWithThreadLocalRandomRecipe,Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()`,Replace `java.lang.Math random()` with `ThreadLocalRandom nextDouble()` to reduce contention.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.OptionalStreamRecipe,Replace `filter(Optional::isPresent).map(Optional::get)` with `flatMap(Optional::stream)`,Replace `Stream.filter(Optional::isPresent).map(Optional::get)` with `.flatMap(Optional::stream)` in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.RemoveFinalizerFromZip,"Remove `finalize()` invocations on `Deflater`, `Inflater` and `ZipFile`","Remove invocations of the deprecated `finalize()` method on `Deflater`, `Inflater` and `ZipFile`.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.ReplaceMathRandomWithThreadLocalRandomRecipe,Replace `Math.random()` with `ThreadLocalRandom.current().nextDouble()`,Replace `Math.random()` with `ThreadLocalRandom.current().nextDouble()` to reduce contention.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.ReplaceStreamCollectWithToList,Replace `Stream.collect(Collectors.toUnmodifiableList())` with `Stream.toList()`,Replace `Stream.collect(Collectors.toUnmodifiableList())` with Java 16+ `Stream.toList()`. Also replaces `Stream.collect(Collectors.toList())` if `convertToList` is set to `true`.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""convertToList"",""type"":""Boolean"",""displayName"":""Convert mutable `Collectors.toList()` to immutable"",""description"":""Also replace `Stream.collect(Collectors.toList())` with `Stream.toList()`. *BEWARE*: Attempts to modify the returned list, result in an `UnsupportedOperationException`!""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.SequencedCollection,Adopt `SequencedCollection`,"Replace older code patterns with `SequencedCollection` methods, as per https://openjdk.org/jeps/431.",7,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.StreamFindFirst,Use `getFirst()` instead of `stream().findFirst().orElseThrow()`,"For SequencedCollections, use `collection.getFirst()` instead of `collection.stream().findFirst().orElseThrow()`.",1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,, -maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.UseEnumSetOf,Prefer `EnumSet of(..)`,Prefer `EnumSet of(..)` instead of using `Set of(..)` when the arguments are enums in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""convertEmptySet"",""type"":""Boolean"",""displayName"":""Convert empty `Set.of()` to `EnumSet.noneOf()`"",""description"":""When true, converts `Set.of()` with no arguments to `EnumSet.noneOf()`. Default true."",""example"":""true""}]", +maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.UseEnumSetOf,Prefer `EnumSet.of(..)`,Prefer `EnumSet.of(..)` instead of using `Set.of(..)` when the arguments are enums in Java 9 or higher.,1,,`java.util` APIs,Modernize,Java,,,Modernize your code to best use the project's current JDK version. Take advantage of newly available APIs and reduce the dependency of your code on third party dependencies where there is equivalent functionality in the Java standard library.,Basic building blocks for transforming Java code.,"[{""name"":""convertEmptySet"",""type"":""Boolean"",""displayName"":""Convert empty `Set.of()` to `EnumSet.noneOf()`"",""description"":""When true, converts `Set.of()` with no arguments to `EnumSet.noneOf()`. Default true."",""example"":""true""}]", maven,org.openrewrite.recipe:rewrite-migrate-java,org.openrewrite.java.migrate.util.UseListOf,Prefer `List.of(..)`,"Prefer `List.of(..)` in Java 10 or higher. Two input shapes are recognised: - Anonymous-class initialization (`new ArrayList<>() {{ add(""a""); add(""b""); }}`), which is replaced wholesale with `List.of(""a"", ""b"")` (immutable result, matching the anonymous-class idiom's typical intent).