Remove a redundant declaration-position @Nullable on a method return

Proprietary

When a method return type already carries a TYPE_USE @Nullable (for example <T> @Nullable T or pkg.@Nullable Type), a second @Nullable in the leading (declaration) position or before the type parameters is redundant, and on generic, qualified, or nested return types it is rejected by javac. This removes that duplicate so the JSpecify annotation survives in the single, valid TYPE_USE position. It only ever removes an annotation that is provably duplicated by one on the return type itself, so it never changes a method's nullability.

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

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