Add @Nullable to method parameters that can receive null
ProprietaryAdds the JSpecify @Nullable annotation to a Java method parameter when some call site anywhere in the project provably passes a nullable argument in that position: the null literal (directly, through a cast or parentheses, or via either branch of a ternary), or a call to a method whose return is itself nullable. The receiving body must leave the parameter unused, return it unchanged, or explicitly return normally for its null branch before its first use. Broad catches and nullable outputs alone leave the input contract for review. It skips primitive parameters, parameters that already carry a nullability annotation, varargs parameters, and @Override methods (where widening a parameter would break override consistency). Only Java parameters are modified.
io. moderne. nullability. AddNullableToParameterCrossFilemod run . --recipe= io. moderne. nullability. AddNullableToParameterCrossFileInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.