Skip to content

Releases: openrewrite/rewrite-migrate-java

3.47.0

Choose a tag to compare

@code-genome-project-ci code-genome-project-ci released this 27 Oct 02:12
63fa0b9

What's Changed

  • Skip var for lambda and method reference initializers by @timtebeek in #1290
  • Update the JVM version in one case in UpdateSdkManTest by @greg-at-moderne in #1291
  • Only use var for primitives when the initializer has the declared type by @timtebeek in #1293
  • Only copy declared type arguments onto diamond constructors when they match by @timtebeek in #1296
  • Don't add the javax JAX-WS runtime when the API is 3.0 or later by @mohitduhan19 in #1294
  • Fix ExtractExplicitConstructorInvocationArguments dropping extracted declarations by @timtebeek in #1297
  • Only run tests for Thread methods removed from newer JDKs on Java 21 and below by @timtebeek in #1298
  • Run tests on Java 25 in CI by @timtebeek in #1299
  • Match logger class literals by type, and format only MXBean headers by @jkschneider in #1300
  • Format and match a visited tree under its parent cursor by @jkschneider in #1302
  • Write code the way the parser makes it, and import what it names by @jkschneider in #1303
  • JavadocToMarkdownDocComment to generate DocComments, not plain comments by @greg-at-moderne in #1308
  • JSpecify migrations remove nullability annotations from void methods by @sullis in #1285
  • Map EE9 Jetty security and WebSocket artifacts to published Jetty 12 modules by @timtebeek in #1311
  • Move EE9 Jetty Java packages to their EE10 and core equivalents in JettyUpgradeEE10 by @timtebeek in #1315
  • Only add jakarta.annotation-api for JSR-250 types, not JSR-305 by @timtebeek in #1316
  • Replace milestone CDI and Faces parser classpath pins with releases by @timtebeek in #1317
  • Bump commons-fileupload2-jakarta-servlet5 target to 2.0.0-M5 by @timtebeek in #1320
  • AddJaxbRuntime: update JAXB runtime versions held in parent POM and Gradle properties by @sambsnyd in #1309
  • Bump expected hibernate-validator version to 7.0.6.Final in test by @greg-at-moderne in #1321
  • Don't add JAXB/JAX-WS runtimes to Gradle buildscript dependencies by @steve-aom-elliott in #1318
  • Fix FileuploadToFileUpload2 package migration and milestone version by @timtebeek in #1322
  • Make recipes that needed a second cycle converge in one, or request it by @knutwannheden in #1324
  • Find CompletableFuture async calls without an Executor by @steve-aom-elliott in #1313
  • Upgrade Mockito to 5.20.x in UpgradeToJava25 by @ds-xdev in #1326
  • Stop aspectjtools flip-flopping between cycles in UpgradeToJava25 by @timtebeek in #1327
  • Upgrade to Gradle 9.8.2 by @jkschneider in #1328
  • Migration recipes remove the imports they leave unused by @knutwannheden in #1329
  • Do not drop the else branch when merging a null check into a switch by @timtebeek in #1331
  • Keep setters that do more than assign their parameter in UseLombokSetter by @timtebeek in #1332
  • Rewrite Chars.compare to Character.compare instead of nonexistent Char.compare by @timtebeek in #1333
  • Keep Lombok running when AddLombokMapstructBinding creates annotationProcessorPaths by @timtebeek in #1335
  • Leave if-else-if chains alone when a switch would change behaviour or not compile by @timtebeek in #1336
  • Keep HttpSession.invalidate() when adding HttpServletRequest.logout() by @timtebeek in #1334
  • Use JavaFileChecker precondition in ExtractExplicitConstructorInvocationArguments by @timtebeek in #1337
  • Add jspecify dependency when migrating Micrometer io.micrometer.core.lang annotations by @timtebeek in #1338
  • Rewrite nested and unqualified getRealPath(String) calls for Servlet 6 by @timtebeek in #1339
  • Stop running the same recipe twice in the Java 8, 11, 21 and Faces 4.1 migrations by @timtebeek in #1340
  • Map fastjson features to the right fastjson2 enum and migrate @JSONField imports by @timtebeek in #1342
  • Keep the unsigned TTL in setTTL and the byte type in getTTL migrations by @timtebeek in #1341
  • Stop half-migrating javax.servlet in RemovalsServletJakarta10 and add Jakarta APIs for subpackage-only users by @timtebeek in #1343
  • Set Java version marker directly in tests using allSources by @timtebeek in #1344
  • Keep code out of converted Markdown doc comments and escaped tags visible by @timtebeek in #1345
  • Use UsesMethod preconditions with the visitors' own matchers (J2) by @timtebeek in #1346
  • Drop forced imports and unneeded contextSensitive() from JavaTemplate recipes by @timtebeek in #1347
  • Remove TypeValidation relaxations that hid recipe bugs (I2 of #1330) by @timtebeek in #1348
  • Make java.net/logging/lang and Guava factory recipes declarative (J4) by @timtebeek in #1350
  • Add missing preconditions and Java version gates to recipes (J1) by @timtebeek in #1349
  • Keep method types in sync with renamed and rebuilt calls (I1 of #1330) by @timtebeek in #1351
  • Drop pinned patch versions when upgrading Docker image tags (B3 of #1330) by @timtebeek in #1352
  • Resolve stale @Disabled and demo tests (K11 of #1330) by @timtebeek in #1353
  • Drop YAML options set to their default value (K9 of #1330) by @timtebeek in #1354
  • Use the Comments trait instead of hand-built comments (K5 of #1330) by @timtebeek in #1355
  • Use ListUtils, JavaIsoVisitor and null checks, drop restating comments (K6 of #1330) by @timtebeek in #1356
  • Move tests to their recipe's package and name them after it (K10 of #1330) by @timtebeek in #1358
  • Polish YAML recipe display names and descriptions (K8 of #1330) by @timtebeek in #1360
  • Hoist visitor matchers and regexes into private static final constants (K4 of #1330) by @timtebeek in #1357
  • Polish Java recipe display names and descriptions (K7 of #1330) by @timtebeek in #1359
  • Preserve nullable values in UseMapOf prose-map conversions by @martinfrancois in #1204
  • Honor Maven compiler processor paths when adding Lombok binding by @jkschneider in #1361
  • Avoid hardcoded patch version in JavaxValidationMigrationToJakartaValidationTest by @jkschneider in #1362
  • Drop Maven-only changeManagedDependency from Gradle ChangeDependencyClassifier by @timtebeek in #1363
  • Fix AboutJavaVersion source version and per-run dedup (H1 of #1330) by @timtebeek in #1365
  • Strip all leading asterisks in DanglingDocCommentToBlockComment (C9 of #1330) by @timtebeek in #1364
  • Fix root-package API recipes reached by the Java 11 migration (D8 of #1330) by @timtebeek in #1366
  • Avoid adding Metro beside compatible JAX-WS providers by @jkschne...
Read more

3.46.0

Choose a tag to compare

@bryceatmoderne bryceatmoderne released this 09 Oct 20:39
f6e1a8e

What's Changed

  • Leave a Groovy def declaration alone instead of splicing var into its variable name. by @motlin in #1229
  • Add MigrateFromSpotBugsAnnotations recipe by @sullis in #1245
  • Replace deprecated AWT show()/hide() calls with setVisible by @timtebeek in #1247
  • Use OpenRewrite's StringUtils instead of Micrometer's by @greg-at-moderne in #1248
  • Extend JavaAwtAPIs with size, preferredSize, and countComponents renames by @jonico in #1249
  • Upgrade the JDK in maven:3.9-eclipse-temurin-* builder images when upgrading Java by @jkschneider in #1250
  • Upgrade the bnd Maven plugin to 7.4.0 in the Java 25 migration by @jkschneider in #1251
  • Upgrade explicit Java versions in pom.xml files that have no Maven model by @jkschneider in #1252
  • Replace the retired adopt setup-java distribution with temurin in the Java 25 migration by @jkschneider in #1253
  • Upgrade Spring Boot 3 Maven parents to 3.5 in the Java 25 migration by @jkschneider in #1254
  • Simplify the dead thread-group fallback left by SystemGetSecurityManagerToNull by @jkschneider in #1255
  • Keep single-statement blocks that carry comments when converting if/else-if to switch by @jkschneider in #1256
  • Add the JAXB API dependency for javax.xml.bind imports the parser could not resolve by @jkschneider in #1257
  • Upgrade cimg/openjdk CI job containers when upgrading Java by @jkschneider in #1258
  • Replace the discontinued mapstruct-jdk8 artifact before upgrading the MapStruct version by @jkschneider in #1260
  • Upgrade an existing Maven wrapper to 3.9.x alongside the Java 17 plugin upgrades by @jkschneider in #1261
  • Upgrade Ehcache to 3.10.x when the Jakarta migration adds the jakarta classifier by @jkschneider in #1262
  • The Jakarta JAXB migration adds jakarta.xml.bind-api for imports the parser could not resolve by @jkschneider in #1264
  • The Jakarta annotation migration adds jakarta.annotation-api for imports the parser could not resolve by @jkschneider in #1265
  • The Jakarta XML Web Services migration adds jakarta.xml.ws-api for imports the parser could not resolve by @jkschneider in #1266
  • The Jakarta JAXB migration adds a JAXB runtime to modules that create a JAXBContext by @jkschneider in #1267
  • The Jakarta REST migration upgrades Jersey 2 to 3.0 and replaces the removed LoggingFilter by @jkschneider in #1268
  • JavaxPersistenceXmlToJakartaPersistenceXml finds persistence descriptors by namespace instead of file name by @jkschneider in #1269
  • The Jakarta JAXB migration upgrades EclipseLink MOXy to 3.0 by @jkschneider in #1270
  • The Jakarta migration updates Jakarta EE type names in string literals by @jkschneider in #1271
  • Apply the springfox-swagger2 upgrade from NoGuava again by @timtebeek in #1286
  • Limit DanglingDocCommentToBlockComment to Java sources by @timtebeek in #1287

New Contributors

Full Changelog: v3.45.0...v3.46.0

3.45.0

Choose a tag to compare

@Jammy-Louie Jammy-Louie released this 23 Sep 17:33
f398db3

What's Changed

  • Fix annotation handling in LombokValToFinalVar by @sullis in #1237
  • Add FindThreadStartInConstructor (Sonar S2693) by @steve-aom-elliott in #1238
  • Add lombok.config recipes by @sullis in #1236
  • Create root lombok.config when a project has none by @sullis in #1242
  • Stop transitive legacy kotlin-stdlib from capping Kotlin modules at Java 24 by @timtebeek in #1243
  • Convert 5-arg URL constructor with URLStreamHandler to URL.of by @harrisleesh in #1241
  • Add a FlagUsage recipe to stop Lombok's val/var from coming back by @sullis in #1244

New Contributors

  • @harrisleesh made their first contribution in #1241

Full Changelog: v3.44.0...v3.45.0

3.44.0

Choose a tag to compare

@Jammy-Louie Jammy-Louie released this 09 Sep 17:11
572a24d

What's Changed

  • Resolve org.openrewrite build plugins from the Code Genome Project by @kmccarp in #1231
  • Improve test coverage for LombokValToFinalVar by @sullis in #1230
  • Preserve casts when converting lombok.val to final var by @sullis in #1233
  • Do not add final to a try-with-resources resource by @sullis in #1232
  • Do not run ExtractExplicitConstructorInvocationArguments on non-Java sources by @knutwannheden in #1235

Full Changelog: v3.43.0...v3.44.0

3.43.0

Choose a tag to compare

@timtebeek timtebeek released this 26 Aug 18:23
cc86d51

What's Changed

  • Fix NoGuava* collection recipes crashing on Groovy sources by @timtebeek in #1210
  • Do not rewrite Docker FROM images built from variables by @timtebeek in #1212
  • Add lombok.checkReturnValueAnnotation to Lombok best practices by @timtebeek in #1214
  • Upgrade ARG default values used in Docker FROM instructions by @timtebeek in #1213
  • Revert "Upgrade ARG default values used in Docker FROM instructions" by @timtebeek in #1215
  • Upgrade ARG default values used in Docker FROM instructions (hold for rewrite release) by @timtebeek in #1216
  • Read an argument and an image name without rewrite-docker internals by @timtebeek in #1220
  • Do not apply var where the declaration cannot legally carry it by @jkschneider in #1221
  • Leave Kotlin and Groovy sources to ListFirstAndLast by @jkschneider in #1222
  • Upgrade AspectJ and fold mockito-inline into mockito-core for Java 25 by @jkschneider in #1223
  • Turn dangling documentation comments into block comments by @jkschneider in #1224
  • Match a distribution whose candidate carries a vendor build by @jkschneider in #1225
  • Drop the rewrite-analysis dependency from URLConstructorToURICreate by @timtebeek in #1226

Full Changelog: v3.42.1...v3.43.0

v3.42.1

Choose a tag to compare

@timtebeek timtebeek released this 19 Aug 12:13
c5ef164

What's Changed

  • Do not duplicate JSpecify annotations when several annotations map to one by @timtebeek in #1200
  • Upgrade maven-pmd-plugin as part of the Java 17 migration by @timtebeek in #1208
  • Update inline Guava recipes for Guava 33.7.0 by @timtebeek in #1207
  • Extend UseListOf prose pattern to LinkedHashSet by @timtebeek in #1209

Full Changelog: v3.42.0...v3.42.1

3.42.0

Choose a tag to compare

@timtebeek timtebeek released this 12 Aug 16:06

What's Changed

  • Adopt upstream XML trailing-comment formatting by @timtebeek in #1180
  • Add mapping for CheckForNull to JSpecify annotation by @zbynek in #1179
  • Skip UseSetOf/UseListOf for HashSet/ArrayList subclasses by @timtebeek in #1182
  • Avoid hardcoded patch version in UpdateSdkManTest by @timtebeek in #1183
  • Only add the Mockito surefire agent configuration when asked, and keep it minimal by @timtebeek in #1184
  • Make subpackage recursion explicit in the Jackson JAX-RS JSON rename by @timtebeek in #1185
  • Add the Mockito agent properties goal in its own execution by @MBoegers in #1186
  • Derive SDKMAN test versions from the candidate list by @timtebeek in #1188
  • Do not apply var when the generic return type needs the declared type by @jevanlingen in #1187
  • Cover legacy Bouncy Castle artifacts and their API changes by @timtebeek in #1189
  • Add jakarta.validation-api dependency when migrating com.sun.istack.NotNull by @steve-aom-elliott in #1190

New Contributors

Full Changelog: v3.41.0...v3.42.0

3.41.0

Choose a tag to compare

@timtebeek timtebeek released this 29 Jul 18:07
128764a

What's Changed

  • Add Mockito Java agent surefire config in reactor modules by @timtebeek in #1169
  • Move Java EE 8 servlet update into separate recipe by @rlsanders4 in #1170
  • Update NoGuavaRefaster expected output for upstream static-import change by @timtebeek in #1171
  • Set Develocity projectId to "openrewrite" by @timtebeek in #1172
  • Add mapstruct-processor to annotation processor paths when Lombok and MapStruct are used by @timtebeek in #1175
  • Fix method patterns for dead UnsignedInts/UnsignedLongs recipes by @timtebeek in #1176
  • Migrate web.xml xsi:schemaLocation from J2EE 1.4 namespace by @steve-aom-elliott in #1177
  • Forward Code Genome Project publish credentials to ci-gradle.yml by @jkschneider in #1178

Full Changelog: v3.40.0...v3.41.0

3.40.0

Choose a tag to compare

@greg-at-moderne greg-at-moderne released this 14 Jul 05:53
6584812

What's Changed

  • Keep \t and \f escapes in UseTextBlocks to avoid incidental whitespace stripping by @timtebeek in #1160
  • Skip UseEnumSetOf empty conversion for static fields to avoid circular class-init (#1157) by @timtebeek in #1161
  • Skip UseMapOf for LinkedHashMap/TreeMap in the prose put() form (#1163) by @timtebeek in #1165
  • Skip AddMockitoJavaAgentToMavenSurefirePlugin when agent already configured in build/plugins by @timtebeek in #1166
  • Add RedundantUtf8Charset recipe to drop redundant UTF-8 from Files calls by @timtebeek in #1167
  • Fix Jakarta EE 10 web.xml migration by @sakshichitnis27 in #1159

New Contributors

Full Changelog: v3.39.0...v3.40.0

3.39.0

Choose a tag to compare

@greg-at-moderne greg-at-moderne released this 01 Jul 06:28
16e662d

What's Changed

  • Make ExtractExplicitConstructorInvocationArguments templates context-free by @knutwannheden in #1140
  • Convert Javadoc <br> tags to Markdown line breaks by @timtebeek in #1142
  • Preserve angle brackets when converting @param <T> to Markdown by @timtebeek in #1141
  • Fix JavadocToMarkdown's handling of varargs and JDKs newer than the bytecode source/target compatibility by @sambsnyd in #1143
  • Move ReplaceUnusedVariablesWithUnderscore to Java best practices by @timtebeek in #1144
  • Extend Use{List,Set,Map}Of to recognise prose-statement chains by @steve-aom-elliott in #1145
  • Skip UseMapOf when the anonymous HashMap is assigned to a concrete HashMap variable by @timtebeek in #1149
  • Fix jakarta.enterprise.concurrent-api version for EE9 and EE10 by @evie-lau in #1152
  • Add recipe to replace jakarta jws-api with ws-api in EE10 by @evie-lau in #1151
  • Upgrade maven-ejb-plugin alongside jakarta.ejb-api by @evie-lau in #1155
  • Upgrade maven-ear-plugin for ee9 and ee11 by @evie-lau in #1156

Full Changelog: v3.38.0...v3.39.0