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

MSAL

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

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

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. Replace varargs org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull
  2. Replace single-argument org.apache.commons.lang3.Validate#notNull with Objects#requireNonNull