Skip to content

Commit 2eb7a09

Browse files
committed
OpenRewrite v8.44.1
1 parent 2cd3be2 commit 2eb7a09

File tree

58 files changed

+1639
-882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1639
-882
lines changed

docs/changelog/8-43-0-Release.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This changelog only shows what recipes have been added, removed, or changed. Ope
77
## New Artifacts
88
* rewrite-compiled-analysis
99
* rewrite-comprehension
10+
* rewrite-javascript
11+
* rewrite-python
1012

1113
## New Recipes
1214

@@ -32,10 +34,17 @@ This changelog only shows what recipes have been added, removed, or changed. Ope
3234
* [org.openrewrite.java.testing.arquillian.ArquillianJUnit4ToArquillianJUnit5](https://docs.openrewrite.org/recipes/java/testing/arquillian/arquillianjunit4toarquillianjunit5): Migrates Arquillian JUnit 4 to JUnit 5.
3335
* [org.openrewrite.java.testing.arquillian.ReplaceArquillianInSequenceAnnotation](https://docs.openrewrite.org/recipes/java/testing/arquillian/replacearquillianinsequenceannotation): Transforms the Arquillian JUnit 4 `@InSequence` to the JUnit Jupiter `@Order`.
3436
* [org.openrewrite.java.testing.assertj.IsEqualToIgnoringMillisToIsCloseToRecipe](https://docs.openrewrite.org/recipes/java/testing/assertj/isequaltoignoringmillistoisclosetorecipe): `isEqualToIgnoringMillis()` is deprecated in favor of `isCloseTo()`.
37+
* [org.openrewrite.javascript.AddLicenseHeader](https://docs.openrewrite.org/recipes/javascript/addlicenseheader): Adds license headers to JavaScript source files when missing. Does not override existing license headers.
38+
* [org.openrewrite.javascript.StaticAnalysis](https://docs.openrewrite.org/recipes/javascript/staticanalysis): Static analysis fixes for JavaScript sources.
39+
* [org.openrewrite.javascript.cleanup.UseCaseFallThrough](https://docs.openrewrite.org/recipes/javascript/cleanup/usecasefallthrough): The comma `,` operator evaluates each of its operands (from left to right) and returns the value of the last operand.The logical OR `||` operator only evaluates the first argument.This recipe replaces the comma and logical OR operator with fall-through cases in switch statements.
40+
* [org.openrewrite.javascript.format.Spaces](https://docs.openrewrite.org/recipes/javascript/format/spaces): Format whitespace in Java/Type Script code.
41+
* [org.openrewrite.javascript.search.FindJavaScriptSources](https://docs.openrewrite.org/recipes/javascript/search/findjavascriptsources): Use data table to collect source files types and counts of files with extensions `.js`, `.jsx`, `.mjs`, `.cjs`, `.ts`, `.tsx`, `.mts`, `.cts`.
3542
* [org.openrewrite.maven.EnableDevelocityBuildCache](https://docs.openrewrite.org/recipes/maven/enabledevelocitybuildcache): Add Develocity build cache configuration to any `.mvn/` Develocity configuration file that lack existing configuration.
3643
* [org.openrewrite.openapi.swagger.MigrateApiImplicitParam](https://docs.openrewrite.org/recipes/openapi/swagger/migrateapiimplicitparam): Migrate `@ApiImplicitParam` to `@Parameter`.
3744
* [org.openrewrite.openapi.swagger.MigrateApiParamDefaultValue](https://docs.openrewrite.org/recipes/openapi/swagger/migrateapiparamdefaultvalue): Migrate `@ApiParam(defaultValue)` to `@Parameter(schema = @Schema(defaultValue))`.
3845
* [org.openrewrite.openapi.swagger.MigrateSwaggerDefinitionToOpenAPIDefinition](https://docs.openrewrite.org/recipes/openapi/swagger/migrateswaggerdefinitiontoopenapidefinition): Migrate from `@SwaggerDefinition` to `@OpenAPIDefinition`.
46+
* [org.openrewrite.python.ChangeMethodName](https://docs.openrewrite.org/recipes/python/changemethodname): Renames a method.
47+
* [org.openrewrite.python.format.PythonSpaces](https://docs.openrewrite.org/recipes/python/format/pythonspaces): Standardizes spaces in Python code. Currently limited to formatting method arguments.
3948
* [software.amazon.awssdk.v2migration.S3MethodsToV2](https://docs.openrewrite.org/recipes/software/amazon/awssdk/v2migration/s3methodstov2): Change S3 methods to v2.
4049

4150
## Removed Recipes

docs/changelog/8-44-1-Release.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# 8.44.1 release (2025-01-24)
2+
3+
:::info
4+
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](https://github.com/openrewrite/rewrite/releases).
5+
:::
6+
7+
## Removed Artifacts
8+
* rewrite-recommendations
9+
10+
## New Recipes
11+
12+
* [org.openrewrite.hcl.ReplaceLegacyAttributeIndexSyntax](https://docs.openrewrite.org/recipes/hcl/replacelegacyattributeindexsyntax): Replace legacy attribute index syntax (`.0`) with the new syntax (`[0]`).
13+
* [org.openrewrite.java.ChangeMethodInvocationReturnType](https://docs.openrewrite.org/recipes/java/changemethodinvocationreturntype): Changes the return type of a method invocation.
14+
* [org.openrewrite.java.ReplaceStringLiteralValue](https://docs.openrewrite.org/recipes/java/replacestringliteralvalue): Replace the value of a complete `String` literal.
15+
* [org.openrewrite.java.migrate.lombok.LombokBestPractices](https://docs.openrewrite.org/recipes/java/migrate/lombok/lombokbestpractices): Applies all recipes that enforce best practices for using Lombok.
16+
* [org.openrewrite.java.spring.boot3.ReplaceMockBeanAndSpyBean](https://docs.openrewrite.org/recipes/java/spring/boot3/replacemockbeanandspybean): Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`.
17+
* [org.openrewrite.java.spring.boot3.ReplaceRestTemplateBuilderMethods](https://docs.openrewrite.org/recipes/java/spring/boot3/replaceresttemplatebuildermethods): Replaces `setConnectTimeout`, `setReadTimeout`, and `setSslBundle` method invocations with `connectTimeout`, `readTimeout`, and `sslBundle` respectively.
18+
* [org.openrewrite.json.AddKeyValue](https://docs.openrewrite.org/recipes/json/addkeyvalue): Adds a `value` at the specified `keyPath` with the specified `key`, if the key doesn't already exist.
19+
* [org.openrewrite.json.format.Indents](https://docs.openrewrite.org/recipes/json/format/indents): Format tabs and indents in JSON.
20+
* [org.openrewrite.maven.UpdateMavenProjectPropertyJavaVersion](https://docs.openrewrite.org/recipes/maven/updatemavenprojectpropertyjavaversion): The Java version is determined by several project properties, including:<br /><br /> * `java.version`<br /> * `jdk.version`<br /> * `javaVersion`<br /> * `jdkVersion`<br /> * `maven.compiler.source`<br /> * `maven.compiler.target`<br /> * `maven.compiler.release`<br /> * `release.version`<br /><br />If none of these properties are in use and the maven compiler plugin is not otherwise configured, adds the `maven.compiler.release` property.
21+
* [org.openrewrite.maven.UseMavenCompilerPluginReleaseConfiguration](https://docs.openrewrite.org/recipes/maven/usemavencompilerpluginreleaseconfiguration): Replaces any explicit `source` or `target` configuration (if present) on the `maven-compiler-plugin` with `release`, and updates the `release` value if needed. Will not downgrade the Java version if the current version is higher.
22+
* [org.openrewrite.staticanalysis.AbstractClassPublicConstructor](https://docs.openrewrite.org/recipes/staticanalysis/abstractclasspublicconstructor): Constructors of `abstract` classes can only be called in constructors of their subclasses. Therefore the visibility of `public` constructors are reduced to `protected`.
23+
* [software.amazon.awssdk.v2migration.SdkBytesToByteBuffer](https://docs.openrewrite.org/recipes/software/amazon/awssdk/v2migration/sdkbytestobytebuffer): Convert SdkBytes to ByteBuffer by calling SdkBytes#asByteBuffer()
24+
25+
## Removed Recipes
26+
27+
* **org.openrewrite.java.boot3.ReplaceMockBeanAndSpyBean**: Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`.
28+
29+
## Changed Recipes
30+
31+
* [org.openrewrite.gradle.plugins.AddBuildPlugin](https://docs.openrewrite.org/recipes/gradle/plugins/addbuildplugin) was changed:
32+
* Old Options:
33+
* `apply: { type: Boolean, required: false }`
34+
* `pluginId: { type: String, required: true }`
35+
* `version: { type: String, required: false }`
36+
* `versionPattern: { type: String, required: false }`
37+
* New Options:
38+
* `acceptTransitive: { type: Boolean, required: false }`
39+
* `apply: { type: Boolean, required: false }`
40+
* `pluginId: { type: String, required: true }`
41+
* `version: { type: String, required: false }`
42+
* `versionPattern: { type: String, required: false }`
43+
* [org.openrewrite.gradle.plugins.AddSettingsPlugin](https://docs.openrewrite.org/recipes/gradle/plugins/addsettingsplugin) was changed:
44+
* Old Options:
45+
* `apply: { type: Boolean, required: false }`
46+
* `pluginId: { type: String, required: true }`
47+
* `version: { type: String, required: false }`
48+
* `versionPattern: { type: String, required: false }`
49+
* New Options:
50+
* `acceptTransitive: { type: Boolean, required: false }`
51+
* `apply: { type: Boolean, required: false }`
52+
* `pluginId: { type: String, required: true }`
53+
* `version: { type: String, required: false }`
54+
* `versionPattern: { type: String, required: false }`
55+
* [org.openrewrite.java.AddOrUpdateAnnotationAttribute](https://docs.openrewrite.org/recipes/java/addorupdateannotationattribute) was changed:
56+
* Old Options:
57+
* `addOnly: { type: Boolean, required: true }`
58+
* `annotationType: { type: String, required: true }`
59+
* `appendArray: { type: Boolean, required: true }`
60+
* `attributeName: { type: String, required: false }`
61+
* `attributeValue: { type: String, required: true }`
62+
* New Options:
63+
* `addOnly: { type: Boolean, required: true }`
64+
* `annotationType: { type: String, required: true }`
65+
* `appendArray: { type: Boolean, required: true }`
66+
* `attributeName: { type: String, required: false }`
67+
* `attributeValue: { type: String, required: true }`
68+
* `oldAttributeValue: { type: String, required: true }`
69+
* [org.openrewrite.maven.ChangePluginGroupIdAndArtifactId](https://docs.openrewrite.org/recipes/maven/changeplugingroupidandartifactid) was changed:
70+
* Old Options:
71+
* `newArtifact: { type: String, required: false }`
72+
* `newArtifactId: { type: String, required: false }`
73+
* `newGroupId: { type: String, required: false }`
74+
* `oldArtifactId: { type: String, required: true }`
75+
* `oldGroupId: { type: String, required: true }`
76+
* New Options:
77+
* `newArtifactId: { type: String, required: false }`
78+
* `newGroupId: { type: String, required: false }`
79+
* `newVersion: { type: String, required: false }`
80+
* `oldArtifactId: { type: String, required: true }`
81+
* `oldGroupId: { type: String, required: true }`
82+
* [org.openrewrite.quarkus.search.FindQuarkusProperties](https://docs.openrewrite.org/recipes/quarkus/search/findquarkusproperties) was changed:
83+
* Old Options:
84+
* `profile: { type: String, required: false }`
85+
* `propertyKey: { type: String, required: true }`
86+
* `searchAllProfiles: { type: Boolean, required: false }`
87+
* New Options:
88+
* `pathExpressions: { type: List, required: false }`
89+
* `profile: { type: String, required: false }`
90+
* `propertyKey: { type: String, required: true }`
91+
* `searchAllProfiles: { type: Boolean, required: false }`
92+
* [org.openrewrite.staticanalysis.UnnecessaryCatch](https://docs.openrewrite.org/recipes/staticanalysis/unnecessarycatch) was changed:
93+
* Old Options:
94+
* `includeJavaLangException: { type: boolean, required: false }`
95+
* New Options:
96+
* `includeJavaLangException: { type: boolean, required: false }`
97+
* `includeJavaLangThrowable: { type: boolean, required: false }`

docs/recipes/ai/timefold/solver/migration/changeversion.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ This recipe is available under the [Apache License 2.0](https://www.apache.org/l
3030
<TabItem value="recipe-list" label="Recipe List" >
3131
* [Change Maven project property value](../../../../maven/changepropertyvalue)
3232
* key: `version.ai.timefold.solver`
33-
* newValue: `1.17.0`
33+
* newValue: `1.18.0`
3434
* addIfMissing: `false`
3535
* trustParent: `true`
3636
* [Change Maven project property value](../../../../maven/changepropertyvalue)
3737
* key: `version.timefold`
38-
* newValue: `1.17.0`
38+
* newValue: `1.18.0`
3939
* addIfMissing: `false`
4040
* trustParent: `true`
4141
* [Change Maven project property value](../../../../maven/changepropertyvalue)
4242
* key: `ai.timefold.solver.version`
43-
* newValue: `1.17.0`
43+
* newValue: `1.18.0`
4444
* addIfMissing: `false`
4545
* trustParent: `true`
4646
* [Change Maven project property value](../../../../maven/changepropertyvalue)
4747
* key: `timefold.version`
48-
* newValue: `1.17.0`
48+
* newValue: `1.18.0`
4949
* addIfMissing: `false`
5050
* trustParent: `true`
5151
* [Change Maven project property value](../../../../maven/changepropertyvalue)
5252
* key: `timefoldVersion`
53-
* newValue: `1.17.0`
53+
* newValue: `1.18.0`
5454
* addIfMissing: `false`
5555
* trustParent: `true`
5656

@@ -67,27 +67,27 @@ description: Replaces the version of Timefold
6767
recipeList:
6868
- org.openrewrite.maven.ChangePropertyValue:
6969
key: version.ai.timefold.solver
70-
newValue: 1.17.0
70+
newValue: 1.18.0
7171
addIfMissing: false
7272
trustParent: true
7373
- org.openrewrite.maven.ChangePropertyValue:
7474
key: version.timefold
75-
newValue: 1.17.0
75+
newValue: 1.18.0
7676
addIfMissing: false
7777
trustParent: true
7878
- org.openrewrite.maven.ChangePropertyValue:
7979
key: ai.timefold.solver.version
80-
newValue: 1.17.0
80+
newValue: 1.18.0
8181
addIfMissing: false
8282
trustParent: true
8383
- org.openrewrite.maven.ChangePropertyValue:
8484
key: timefold.version
85-
newValue: 1.17.0
85+
newValue: 1.18.0
8686
addIfMissing: false
8787
trustParent: true
8888
- org.openrewrite.maven.ChangePropertyValue:
8989
key: timefoldVersion
90-
newValue: 1.17.0
90+
newValue: 1.18.0
9191
addIfMissing: false
9292
trustParent: true
9393

docs/recipes/apache/commons/lang/upgradeapachecommonslang_2_3.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem';
99

1010
**org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang\_2\_3**
1111

12-
_Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per [the migration release notes](https://commons.apache.org/proper/commons-lang/article3_0.html)._
12+
_Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per [the migration release notes](https://commons.apache.org/proper/commons-lang/article3_0.html)._
1313

1414
### Tags
1515

@@ -43,6 +43,7 @@ This recipe is available under the [Moderne Source Available License](https://do
4343
* [Rename package name](../../../java/changepackage)
4444
* oldPackageName: `org.apache.commons.lang`
4545
* newPackageName: `org.apache.commons.lang3`
46+
* recursive: `true`
4647

4748
</TabItem>
4849

@@ -53,7 +54,7 @@ This recipe is available under the [Moderne Source Available License](https://do
5354
type: specs.openrewrite.org/v1beta/recipe
5455
name: org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3
5556
displayName: Migrates to Apache Commons Lang 3.x
56-
description: Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per [the migration release notes](https://commons.apache.org/proper/commons-lang/article3_0.html).
57+
description: Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per [the migration release notes](https://commons.apache.org/proper/commons-lang/article3_0.html).
5758
tags:
5859
- apache
5960
- lang
@@ -68,6 +69,7 @@ recipeList:
6869
- org.openrewrite.java.ChangePackage:
6970
oldPackageName: org.apache.commons.lang
7071
newPackageName: org.apache.commons.lang3
72+
recursive: true
7173

7274
```
7375
</TabItem>

docs/recipes/apache/httpclient5/upgradeapachehttpclient_5_classmapping.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ This recipe is available under the [Moderne Source Available License](https://do
3434
* [Change type](../../java/changetype)
3535
* oldFullyQualifiedTypeName: `org.apache.hc.client5.http.classic.methods.CloseableHttpResponse`
3636
* newFullyQualifiedTypeName: `org.apache.hc.client5.http.impl.classic.CloseableHttpResponse`
37+
* [Change type](../../java/changetype)
38+
* oldFullyQualifiedTypeName: `org.apache.hc.client5.http.classic.methods.HttpRequestBase`
39+
* newFullyQualifiedTypeName: `org.apache.hc.client5.http.classic.methods.HttpUriRequestBase`
3740
* [Rename package name](../../java/changepackage)
3841
* oldPackageName: `org.apache.http.client.entity`
3942
* newPackageName: `org.apache.hc.client5.http.entity`
@@ -409,6 +412,9 @@ recipeList:
409412
- org.openrewrite.java.ChangeType:
410413
oldFullyQualifiedTypeName: org.apache.hc.client5.http.classic.methods.CloseableHttpResponse
411414
newFullyQualifiedTypeName: org.apache.hc.client5.http.impl.classic.CloseableHttpResponse
415+
- org.openrewrite.java.ChangeType:
416+
oldFullyQualifiedTypeName: org.apache.hc.client5.http.classic.methods.HttpRequestBase
417+
newFullyQualifiedTypeName: org.apache.hc.client5.http.classic.methods.HttpUriRequestBase
412418
- org.openrewrite.java.ChangePackage:
413419
oldPackageName: org.apache.http.client.entity
414420
newPackageName: org.apache.hc.client5.http.entity

docs/recipes/core/findcallgraph.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ _Records method callers and the methods they invoke._
168168

169169
| Column Name | Description |
170170
| ----------- | ----------- |
171+
| From source set | The source set from which the action is issued. |
171172
| From class | The fully qualified name of the class from which the action is issued. |
172173
| From name | The name of the method or scope from which the action is issued. |
173174
| From arguments | The argument types, if any, to the method or scope from which the action is issued. Expressed as a comma-separated list |

docs/recipes/gradle/plugins/addbuildplugin.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ _Add a build plugin to a Gradle build file's `plugins` block._
2424
| `String` | version | *Optional*. An exact version number or node-style semver selector used to select the version number. You can also use `latest.release` for the latest available version and `latest.patch` if the current version is a valid semantic version. For more details, you can look at the documentation page of [version selectors](https://docs.openrewrite.org/reference/dependency-version-selectors). | `3.x` |
2525
| `String` | versionPattern | *Optional*. Allows version selection to be extended beyond the original Node Semver semantics. So for example,Setting 'version' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre | `-jre` |
2626
| `Boolean` | apply | *Optional*. Immediate apply the plugin. Defaults to `true`. Valid options: `true`, `false` | |
27+
| `Boolean` | acceptTransitive | *Optional*. Some plugins apply other plugins. When this is set to true no plugin declaration will be added if the plugin is already applied transitively. When this is set to false the plugin will be added explicitly even if it is already applied transitively. Defaults to `true`. Valid options: `true`, `false` | |
2728

2829
## License
2930

docs/recipes/gradle/plugins/adddevelocitygradleplugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ _Statistics used in analyzing the performance of recipes._
180180

181181

182182
## Contributors
183-
[Sam Snyder](mailto:sam@moderne.io), [Shannon Pamperl](mailto:shanman190@gmail.com), [Jonathan Schneider](mailto:jkschneider@gmail.com), [Alexis Tual](mailto:atual@gradle.com), [Joan Viladrosa](mailto:joan@moderne.io), [Tim te Beek](mailto:tim@moderne.io)
183+
[Sam Snyder](mailto:sam@moderne.io), [Shannon Pamperl](mailto:shanman190@gmail.com), [Jonathan Schneider](mailto:jkschneider@gmail.com), [Alexis Tual](mailto:atual@gradle.com), [Greg Oledzki](mailto:greg.oledzki@moderne.io), [Joan Viladrosa](mailto:joan@moderne.io), [Tim te Beek](mailto:tim@moderne.io)

0 commit comments

Comments
 (0)