Skip to content

Idiomatic way to remove/search/change if it has a certain value #4524

Answered by timtebeek
crankydillo asked this question in Q&A
Discussion options

You must be logged in to vote

You could add a precondition using org.openrewrite.properties.ChangePropertyValue, to match the old value and change it to something else.. Only if that produces any changes would the recipeList containing your removal be executed. Hope that's clear and helps!

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@crankydillo
Comment options

@timtebeek
Comment options

@crankydillo
Comment options

@timtebeek
Comment options

Answer selected by timtebeek
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