Relocate a misplaced leading @Nullable on a primitive array to the array reference
ProprietaryTurns @Nullable long[] x into long @Nullable [] x. On a primitive-element array a leading @Nullable binds to the (impossible-to-be-null) element type, so NullAway still treats the array reference as @NonNull; moving the annotation to the array-reference position that NullAway reads fixes that without changing intent. Only primitive-element arrays are changed; object-element arrays, where a leading @Nullable legitimately means nullable elements, are left untouched.
io. moderne. nullability. RelocateNullableToArrayReferencemod run . --recipe= io. moderne. nullability. RelocateNullableToArrayReferenceInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.