From 0522a6154480b16c78588d2ee0614345ade63a80 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Thu, 14 Nov 2024 12:32:39 -0800 Subject: [PATCH] Upgrade google guice version as part of Java 17 migration --- .../resources/META-INF/rewrite/java-version-17.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/resources/META-INF/rewrite/java-version-17.yml b/src/main/resources/META-INF/rewrite/java-version-17.yml index 3e5f92a6fb..bc357911ab 100644 --- a/src/main/resources/META-INF/rewrite/java-version-17.yml +++ b/src/main/resources/META-INF/rewrite/java-version-17.yml @@ -47,6 +47,10 @@ recipeList: - org.openrewrite.java.migrate.RemovedRMIConnectorServerCredentialTypesConstant - org.openrewrite.java.migrate.RemovedFileIOFinalizeMethods - org.openrewrite.java.migrate.UpgradePluginsForJava17 + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: com.google.inject + artifactId: guice + newVersion: 5.x --- type: specs.openrewrite.org/v1beta/recipe @@ -155,7 +159,7 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.migrate.RemovedZipFinalizeMethods displayName: Replace `finalize` method in `java.util.zip.ZipFile`, `java.util.zip.Inflater` and `java.util.zip.Deflater` description: >- - The `finalize` method in `java.util.zip.ZipFile` is replaced with the `close` method and is replaced by the `end` method in + 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. tags: - java17 @@ -177,8 +181,8 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl displayName: Replace `SSLSession.getPeerCertificateChain()` method description: >- - 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`. + 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. tags: - java17 @@ -272,7 +276,7 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.migrate.RemovedRuntimeTraceMethods displayName: Remove `Runtime.traceInstructions(boolean)` and `Runtime.traceMethodCalls` methods description: >- - 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 `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. tags: - java17