JSpecify best practices

MSAL

Apply JSpecify best practices, such as migrating off of alternatives, and adding missing @Nullable annotations.

org.openrewrite.java.jspecify.JSpecifyBestPractices
mod run . --recipe=org.openrewrite.java.jspecify.JSpecifyBestPractices

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. Migrate to JSpecify
  2. Annotate methods which may return null with @Nullable
  3. Annotate null-checked method parameters with @Nullable
  4. Annotate required method parameters with @NonNull
  5. Move @Nullable method annotations to the return type