Wrap nullable arguments passed to non-null parameters in requireNonNull
ProprietaryWraps in java.util.Objects.requireNonNull(...) (statically imported) each argument that passes a provably-nullable value to a library parameter that is not declared @Nullable. Inside a @NullMarked scope NullAway treats every unannotated parameter as non-null, so such a call is an error. A parameter declared in the project itself is flagged for review instead of wrapped: the original call tolerated null wherever the callee does, so widening the parameter to @Nullable is the behavior-preserving fix. Argument and parameter nullness are resolved from the nullness oracle and the flow engine (no name-based heuristics). The fix only fires where the call site is @NullMarked and the callee is itself in an annotated scope, and never asserts non-null on a value that is genuinely nullable at the site (a value read inside its own null-check is left for a human). A value that is explicitly null on some path (a bare null literal or a ternary with a null arm) is not wrapped but flagged for review with an advisory marker, since the parameter likely should be @Nullable. Idempotent and conservative; only Java sources are modified.
io. moderne. nullability. WrapNullableArgumentInRequireNonNullOptional
Comma-separated package prefixes to limit the fix to (matching NullAway's AnnotatedPackages option). When unset, the recipe fixes all packages.
The non-null assertion form to emit at a wrap site. AUTO (the default) emits Preconditions.checkNotNull in a file that already imports Guava's Preconditions, otherwise Objects.requireNonNull. CAST_TO_NON_NULL is explicit-only (it is suppression-like — no runtime throw) and never auto-selected.
mod run . --recipe= io. moderne. nullability. WrapNullableArgumentInRequireNonNullInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.