From abdb238599bf57a9412d1d9ed010ea275c5754a5 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Mon, 6 Feb 2017 11:52:15 -0800 Subject: [PATCH] [infer][java] disable the Eradicate model for Context.getSystemService(..) Summary: This method can return `null` if the parameter is not a supported system service. However, since this method tends to be called with a constant value as parameter, it does seem to be returning null often in practice. Reviewed By: sblackshear Differential Revision: D4509185 fbshipit-source-id: 4cb80ce --- infer/src/eradicate/modelTables.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/eradicate/modelTables.ml b/infer/src/eradicate/modelTables.ml index f247778c4..5f4a00ed2 100644 --- a/infer/src/eradicate/modelTables.ml +++ b/infer/src/eradicate/modelTables.ml @@ -114,7 +114,9 @@ let mapPut_list = (** Models for @Strict annotations *) let annotated_list_strict = [ - (n, [o]), "android.content.Context.getSystemService(java.lang.String):java.lang.Object"; + (* TODO: Investigate further if this method needs to + be considered as Nullable *) + (* (n, [o]), "android.content.Context.getSystemService(java.lang.String):java.lang.Object"; *) ] (** Models for @Nullable annotations *)