Prefer Math#clamp
MSALPrefer java.lang.Math#clamp instead of using com.google.common.primitives.*#constrainToRange.
org. openrewrite. java. migrate. guava. PreferMathClampmod run . --recipe= org. openrewrite. java. migrate. guava. PreferMathClampInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Change method name
com.google.common.primitives.Doubles constrainToRange(..)toclamp - Change method target to static
- Change method name
com.google.common.primitives.Floats constrainToRange(..)toclamp - Change method target to static
- Change method name
com.google.common.primitives.Longs constrainToRange(..)toclamp - Change method target to static