Replace constant with literal value
Apache 2.0Replace a named constant with a literal value when you wish to remove the old constant. A String literal must include escaped quotes.
org. openrewrite. java. ReplaceConstantRequired
The target type in which the constant to be replaced is defined.
The name of the constant field to replace.
The literal value to replace.
mod run . --recipe= org. openrewrite. java. ReplaceConstant \
-P owningType= com. google. common. base. Charsets \
-P constantName= UTF_8 \
-P literalValue= UTF_8Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.