Replace single-argument org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull

MSAL

Replace org.apache.commons.lang3.Validate.notNull(Object) with Objects.requireNonNull(Object).

org.openrewrite.staticanalysis.ReplaceValidateNotNullHavingSingleArgWithObjectsRequireNonNull
mod run . --recipe=org.openrewrite.staticanalysis.ReplaceValidateNotNullHavingSingleArgWithObjectsRequireNonNull

Install 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.

  1. Change method name org.apache.commons.lang3.Validate notNull(..) to requireNonNull
  2. Change method target to static