Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Recipe RemovedRuntimeTraceMethods Java 17 #530

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/resources/META-INF/rewrite/java-version-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ recipeList:
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 +261,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)'
timtebeek marked this conversation as resolved.
Show resolved Hide resolved
Loading