Add @Nullable to methods that can return null

Proprietary

Adds the JSpecify @Nullable annotation to the return type of Java methods whose body returns a provably-nullable value: an explicit return null (directly, through a cast or parentheses, or via either branch of a ternary), or a call to a method whose return is itself nullable. Conservative by design: it skips primitive and void returns, methods that already carry a nullability annotation, and @Override methods (where annotating the return could violate the supertype contract). Only Java return types are modified.

io.moderne.nullability.AddNullableToReturnType
mod run . --recipe=io.moderne.nullability.AddNullableToReturnType

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.