type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.guava.PreferMathSubtractExact
displayName: Prefer `Math#subtractExact`
description: This method exists in the Java standard library now.
- org.openrewrite.java.ChangeMethodName:
methodPattern: com.google.common.math.IntMath checkedSubtract(..)
newMethodName: subtractExact
- org.openrewrite.java.ChangeMethodTargetToStatic:
methodPattern: com.google.common.math.IntMath subtractExact(..)
fullyQualifiedTargetTypeName: java.lang.Math