Skip to content

Commit

Permalink
Add Recipe RemovedRuntimeTraceMethods Java 17 (#530)
Browse files Browse the repository at this point in the history
* add RemovedRuntimeTraceMethods java 17

* removed duplicate enteries for removeTraceMethods and kept the named Recipe

* End java-version-17.yml with a new line

---------

Co-authored-by: anuram <[email protected]>
Co-authored-by: Tim te Beek <[email protected]>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent 258b99b commit 217cf89
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/main/resources/META-INF/rewrite/java-version-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ recipeList:
- org.openrewrite.java.migrate.UpgradeBuildToJava17
- org.openrewrite.java.migrate.lang.StringFormatted
- org.openrewrite.staticanalysis.InstanceOfPatternMatch
- org.openrewrite.java.migrate.RemoveMethodInvocation:
methodPattern: java.lang.Runtime traceInstructions(boolean)
- org.openrewrite.java.migrate.RemoveMethodInvocation:
methodPattern: java.lang.System traceMethodCalls(boolean)
- org.openrewrite.java.migrate.RemovedRuntimeTraceMethods
- org.openrewrite.java.migrate.RemovedToolProviderConstructor
- org.openrewrite.java.migrate.RemovedModifierAndConstantBootstrapsConstructors
- org.openrewrite.java.migrate.lang.UseTextBlocks
Expand Down Expand Up @@ -260,3 +257,17 @@ recipeList:
- org.openrewrite.java.ChangeMethodTargetToStatic:
methodPattern: java.lang.invoke.ConstantBootstraps *(..)
fullyQualifiedTargetTypeName: java.lang.invoke.ConstantBootstraps
---
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 recipe removes the invocations of these methods since the method invocations do nothing functionally.
tags:
- java17
recipeList:
- org.openrewrite.java.migrate.RemoveMethodInvocation:
methodPattern: 'java.lang.Runtime traceInstructions(boolean)'
- org.openrewrite.java.migrate.RemoveMethodInvocation:
methodPattern: 'java.lang.Runtime traceMethodCalls(boolean)'

0 comments on commit 217cf89

Please sign in to comment.