From 9d2daee569e91b496bf18fa00127b4c1b912266a Mon Sep 17 00:00:00 2001 From: Artem Pianykh Date: Mon, 14 Dec 2020 08:02:30 -0800 Subject: [PATCH] [nullsafe] Fix checkState model Summary: First argument is a boolean and thus is always non-null, rather than nullable. Reviewed By: ngorogiannis Differential Revision: D25532156 fbshipit-source-id: e334e0886 --- infer/src/nullsafe/modelTables.ml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/infer/src/nullsafe/modelTables.ml b/infer/src/nullsafe/modelTables.ml index 77d2ad779..f504d16f5 100644 --- a/infer/src/nullsafe/modelTables.ml +++ b/infer/src/nullsafe/modelTables.ml @@ -156,29 +156,29 @@ let check_not_null_parameter_list, check_not_null_list = let check_state_list = - [ ((o, [n]), "Preconditions.checkState(boolean):void") - ; ((o, [n]), "com.facebook.common.internal.Preconditions.checkState(boolean):void") - ; ( (o, [n; n]) + [ ((o, [o]), "Preconditions.checkState(boolean):void") + ; ((o, [o]), "com.facebook.common.internal.Preconditions.checkState(boolean):void") + ; ( (o, [o; n]) , "com.facebook.common.internal.Preconditions.checkState(boolean,java.lang.Object):void" ) - ; ( (o, [n; n; n]) + ; ( (o, [o; n; n]) , "com.facebook.common.internal.Preconditions.checkState(boolean,java.lang.String,java.lang.Object[]):void" ) - ; ((o, [n]), "com.facebook.common.preconditions.Preconditions.checkState(boolean):void") - ; ( (o, [n; n]) + ; ((o, [o]), "com.facebook.common.preconditions.Preconditions.checkState(boolean):void") + ; ( (o, [o; n]) , "com.facebook.common.preconditions.Preconditions.checkState(boolean,java.lang.Object):void" ) - ; ( (o, [n; n; n]) + ; ( (o, [o; n; n]) , "com.facebook.common.preconditions.Preconditions.checkState(boolean,java.lang.String,java.lang.Object[]):void" ) - ; ((o, [n]), "com.google.common.base.Preconditions.checkState(boolean):void") - ; ((o, [n; n]), "com.google.common.base.Preconditions.checkState(boolean,java.lang.Object):void") - ; ( (o, [n; n; n]) + ; ((o, [o]), "com.google.common.base.Preconditions.checkState(boolean):void") + ; ((o, [o; n]), "com.google.common.base.Preconditions.checkState(boolean,java.lang.Object):void") + ; ( (o, [o; n; n]) , "com.google.common.base.Preconditions.checkState(boolean,java.lang.String,java.lang.Object[]):void" ) - ; ((o, [n]), "com.facebook.infer.annotation.Assertions.assertCondition(boolean):void") - ; ( (o, [n; o]) + ; ((o, [o]), "com.facebook.infer.annotation.Assertions.assertCondition(boolean):void") + ; ( (o, [o; o]) , "com.facebook.infer.annotation.Assertions.assertCondition(boolean,java.lang.String):void" ) - ; ((o, [n]), "com.facebook.infer.annotation.Assertions.assumeCondition(boolean):void") - ; ( (o, [n; o]) + ; ((o, [o]), "com.facebook.infer.annotation.Assertions.assumeCondition(boolean):void") + ; ( (o, [o; o]) , "com.facebook.infer.annotation.Assertions.assumeCondition(boolean,java.lang.String):void" ) ]