Skip to content

Commit

Permalink
Adopt RemoveMethodInvocations from core (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Nov 18, 2024
1 parent 1464e13 commit 7adeff2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 140 deletions.

This file was deleted.

18 changes: 9 additions & 9 deletions src/main/resources/META-INF/rewrite/jakarta-ee-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.ServletCookieBehaviorChangeRFC6265
displayName: Remove `getComment` and `getVersion` methods
description: >-
Jakarta Servlet methods have been deprecated for removal in Jakarta Servlet 6.0 to align with RFC 6265.
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.
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.http.Cookie getComment()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.http.Cookie getVersion()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.http.Cookie setComment(String)
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.http.Cookie setVersion(int)
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.SessionCookieConfig getComment()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: jakarta.servlet.SessionCookieConfig setComment(String)
---
type: specs.openrewrite.org/v1beta/recipe
Expand All @@ -75,7 +75,7 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.RemovedIsParmetersProvidedMethod
displayName: Use `isParametersProvided()`
description: >-
Expression Language prior to 5.0 provides the deprecated MethodExpression.isParmetersProvided() method, with the word 'parameter' misspelled in the method name.
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.
recipeList:
- org.openrewrite.java.ChangeMethodName:
Expand All @@ -86,7 +86,7 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.RemovedSOAPElementFactory
displayName: Use `jakarta.xml.soap.SOAPFactory` to create `SOAPElements`
description: >-
XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class,
XML Web Services prior to 4.0 provides the deprecated SOAPElementFactory class,
which is removed in XML Web Services 4.0. The recommended replacement is to use jakarta.xml.soap.SOAPFactory to create SOAPElements.
recipeList:
- org.openrewrite.java.ChangeMethodName:
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/rewrite/java-version-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ recipeList:
- org.openrewrite.staticanalysis.PrimitiveWrapperClassConstructorToValueOf
- org.openrewrite.java.migrate.concurrent.JavaConcurrentAPIs
- org.openrewrite.java.migrate.lang.JavaLangAPIs
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.lang.Runtime runFinalizersOnExit(boolean)
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.lang.System runFinalizersOnExit(boolean)
- org.openrewrite.java.migrate.logging.JavaLoggingAPIs
- org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
Expand Down Expand Up @@ -268,9 +268,9 @@ description: >-
tags:
- java11
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.lang.Thread destroy()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.lang.Thread stop(java.lang.Throwable)
---
type: specs.openrewrite.org/v1beta/recipe
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/rewrite/java-version-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ description: >-
tags:
- java17
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: 'java.lang.Thread countStackFrames()'
---
type: specs.openrewrite.org/v1beta/recipe
Expand Down Expand Up @@ -281,7 +281,7 @@ description: >-
tags:
- java17
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: 'java.lang.Runtime traceInstructions(boolean)'
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: 'java.lang.Runtime traceMethodCalls(boolean)'
10 changes: 5 additions & 5 deletions src/main/resources/META-INF/rewrite/java-version-21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.RemovedSubjectMethods
displayName: Adopt `javax.security.auth.Subject.current()` and `javax.security.auth.Subject.callAs()` methods`
description: >-
Replaces the `javax.security.auth.Subject.getSubject()` and `javax.security.auth.Subject.doAs()` 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()`.
tags:
- java21
Expand All @@ -121,9 +121,9 @@ description: The java.desktop module had a few implementations of finalize() tha
tags:
- java21
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.awt.color.ICC_Profile finalize()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.awt.image.ColorModel finalize()
- org.openrewrite.java.migrate.RemoveMethodInvocation:
methodPattern: java.awt.image.IndexColorModel finalize()
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.awt.image.IndexColorModel finalize()
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/rewrite/java-version-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ tags:
recipeList:
- org.openrewrite.java.migrate.UpgradeToJava7
- org.openrewrite.java.migrate.MXBeanRule
- org.openrewrite.java.migrate.RemoveMethodInvocation:
- org.openrewrite.java.RemoveMethodInvocations:
methodPattern: java.lang.Thread destroy()

This file was deleted.

0 comments on commit 7adeff2

Please sign in to comment.