Skip to content
Discussion options

You must be logged in to vote

Hi @kennytv ; Depending on your use case this recipe might be closest to what you're looking for:
https://docs.openrewrite.org/recipes/java/replaceconstantwithanotherconstant

type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.ReplaceConstantWithAnotherConstantExample
displayName: Replace constant with another constant example
recipeList:
  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
      existingFullyQualifiedConstantName: org.springframework.http.MediaType.APPLICATION_JSON_VALUE
      fullyQualifiedConstantName: org.springframework.http.MediaType.APPLICATION_JSON_VALUE

There's a few related recipes in the same recipe module that manipulate constants in different …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kennytv
Comment options

@timtebeek
Comment options

Answer selected by kennytv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants