8.41.0 release (2024-11-28)
info
This changelog only shows what recipes have been added, removed, or changed. OpenRewrite may do releases that do not include these types of changes. To see these changes, please go to the releases page.
New Recipes
- org.openrewrite.codehaus.plexus.AbstractLogEnabledToSlf4j: Introduce a SLF4J
Loggerfield and replace calls togetLogger()with calls to the field. - org.openrewrite.github.UpgradeSlackNotificationVersion2: Update the Slack GitHub Action to use version 2.0.
- org.openrewrite.gitlab.AddComponent: Add a GitLab component to an existing list, or add a new list where none was present.
- org.openrewrite.gitlab.AddTemplate: Add a GitLab template to an existing list, or add a new list where none was present.
- org.openrewrite.gitlab.ChangeTemplate: Change a GitLab template in use.
- org.openrewrite.gitlab.RemoveTemplate: Remove a GitLab template from use.
- org.openrewrite.gitlab.search.FindComponent: Find a GitLab Component in use.
- org.openrewrite.gitlab.search.FindTemplate: Find a GitLab Template in use.
- org.openrewrite.java.AddCommentToMethod: Add a comment to a Java source file.
- org.openrewrite.java.migrate.AddLombokMapstructBinding: Add the
lombok-mapstruct-bindingannotation processor as needed when both MapStruct and Lombok are used. - org.openrewrite.java.migrate.ArrayStoreExceptionToTypeNotPresentException: Replace catch blocks for
ArrayStoreExceptionaroundClass.getAnnotation()withTypeNotPresentExceptionto ensure compatibility with Java 11+. - org.openrewrite.java.spring.ChangeMethodParameter: Change parameter type for a method declaration, identified by a method pattern.
- org.openrewrite.java.spring.CommentOutSpringPropertyKey: Add comment to specified Spring properties, and comment out the property.
- org.openrewrite.java.spring.batch.UpgradeSkipPolicyParameterType: The
skipCountparameter inorg.springframework.batch.core.step.skip.SkipPolicy#shouldSkiphas been changed frominttolong, this recipe updates the parameter type in the implementing classes. - org.openrewrite.java.spring.data.RefactorSimpleMongoDbFactory: Replace usage of deprecated
new SimpleMongoDbFactory(new MongoClientURI(String))withnew SimpleMongoClientDbFactory(String). - org.openrewrite.java.springdoc.MigrateSpringdocCommon: Migrate from springdoc-openapi-common to springdoc-openapi-starter-common.
- org.openrewrite.java.testing.htmlunit.UpgradeHtmlUnit_3: Automates the HtmlUnit migration guide from 2.x to 3.x.
- org.openrewrite.java.testing.junit5.UseAssertSame: Prefers the usage of
assertSameorassertNotSamemethods instead of using of vanillaassertTrueorassertFalsewith a boolean comparison. - org.openrewrite.kubernetes.migrate.MigrateToAPIv1_16: This recipe will apply changes commonly needed when migrating to Kubernetes API v1.16.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_22: This recipe will apply changes commonly needed when migrating to Kubernetes API v1.22.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_25: This recipe will apply changes commonly needed when migrating to Kubernetes API v1.25.
- org.openrewrite.maven.AddAnnotationProcessor: Add an annotation processor to the maven compiler plugin. Will not do anything if it already exists. Also doesn't add anything when no other annotation processors are defined yet. (Perhaps
ChangePluginConfigurationcan be used). - org.openrewrite.properties.AddPropertyComment: Add a new comment before a property key if not already present, optionally commenting out the property.
- org.openrewrite.reactive.reactor.ReactorDoAfterSuccessOrErrorToTap: As of reactor-core 3.5 the
doAfterSuccessOrErrormethod is removed, this recipe replaces it with thetapoperator. - org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement: Removes
returnfrom avoidmethod if it's the last statement.
Removed Recipes
- org.openrewrite.gitlab.core.AddTemplate: Add a GitLab template to an existing list, or add a new list where none was present.
- org.openrewrite.gitlab.core.ChangeTemplate: Change a GitLab template in use.
- org.openrewrite.gitlab.core.RemoveTemplate: Remove a GitLab template from use.
- org.openrewrite.java.migrate.RemoveMethodInvocation: Checks for a method patterns and removes the method call from the class.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4: Migrate properties found in
application.propertiesandapplication.yml. - org.openrewrite.java.spring.data.RefactorSimpleMongoDbFactoryRecipe: Replace usage of deprecated
new SimpleMongoDbFactory(new MongoClientURI(String))withnew SimpleMongoClientDbFactory(String). - org.openrewrite.jenkins.UpgradeHtmlUnit_3_3_0: Automates the HtmlUnit migration guide from 2.x to 3.x. This change was brought in by parent 4.66.
Changed Recipes
- org.openrewrite.java.AddOrUpdateAnnotationAttribute was changed:
- Old Options:
addOnly: { type: Boolean, required: true }annotationType: { type: String, required: true }attributeName: { type: String, required: false }attributeValue: { type: String, required: true }
- New Options:
addOnly: { type: Boolean, required: true }annotationType: { type: String, required: true }appendArray: { type: Boolean, required: true }attributeName: { type: String, required: false }attributeValue: { type: String, required: true }
- Old Options: