From 6564dc9e2fcfc3cdbb4ff47db753f573190ee6ed Mon Sep 17 00:00:00 2001 From: Artem Pianykh Date: Fri, 29 Nov 2019 05:38:18 -0800 Subject: [PATCH] [nullsafe] Add androidx.core.util.Preconditions.checkNotNull models Summary: We already have a number of `[pkg].Preconditions.checkNotNull` modelled, but the one from `androidx` is missing yet widely used. Reviewed By: mityal Differential Revision: D18748550 fbshipit-source-id: 83d3317ae --- infer/src/nullsafe/modelTables.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/infer/src/nullsafe/modelTables.ml b/infer/src/nullsafe/modelTables.ml index a1db985f7..3c484bdaa 100644 --- a/infer/src/nullsafe/modelTables.ml +++ b/infer/src/nullsafe/modelTables.ml @@ -125,6 +125,13 @@ let check_not_null_parameter_list, check_not_null_list = ; ( 1 , (o, [n; o]) , "com.facebook.infer.annotation.Assertions.assumeNotNull(java.lang.Object,java.lang.String):java.lang.Object" + ) + ; ( 1 + , (o, [x]) + , "androidx.core.util.Preconditions.checkNotNull(java.lang.Object):java.lang.Object" ) + ; ( 1 + , (o, [x; n]) + , "androidx.core.util.Preconditions.checkNotNull(java.lang.Object,java.lang.Object):java.lang.Object" ) ] in (List.map ~f:(fun (x, _, z) -> (x, z)) list, List.map ~f:(fun (_, y, z) -> (y, z)) list)