[nullsafe] Respect NullableDecl annotation

Summary:
This declaration is heavily used in Guava library.
Quick inspection shows that majority of methods are annotated correctly.

This will hide previosly hidden unsoundness issues in the codebase.

Reviewed By: artempyanykh

Differential Revision: D20737104

fbshipit-source-id: aa048bfc1
master
Mitya Lyubarskiy 5 years ago committed by Facebook GitHub Bot
parent 88e9079357
commit 08e7a11edf

@ -61,6 +61,8 @@ let no_allocation = "NoAllocation"
let nullable = "Nullable"
let nullable_decl = "NullableDecl"
let nullsafe_strict = "NullsafeStrict"
let nullsafe = "Nullsafe"
@ -183,6 +185,9 @@ let ia_is_propagates_nullable ia = ia_ends_with ia propagates_nullable
let ia_is_nullable ia =
List.exists ~f:(ia_ends_with ia)
[ nullable
; nullable_decl
(* From org.checkerframework.checker.nullness.compatqual package. Extensively used in Guava library.
Identical to {@code @Nullable}, but can only be written at declaration locations. *)
; propagates_nullable (* @PropagatesNullable is implicitly nullable *)
; recently_nullable
(* @RecentlyNullable is a special annotation that was added to solve backward compatibility issues

Loading…
Cancel
Save