From cbf068d1a098d4cc2c4ca1224f8a1a68f1571326 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Thu, 9 Jan 2020 01:59:33 -0800 Subject: [PATCH] [racerd] remove redundant check Summary: The first condition subsumes the second. Reviewed By: ezgicicek Differential Revision: D19211397 fbshipit-source-id: 1dea38a59 --- infer/src/concurrency/RacerDModels.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/infer/src/concurrency/RacerDModels.ml b/infer/src/concurrency/RacerDModels.ml index dff536764..6a8518562 100644 --- a/infer/src/concurrency/RacerDModels.ml +++ b/infer/src/concurrency/RacerDModels.ml @@ -274,11 +274,7 @@ let threadsafe_annotations = as an alias of @ThreadSafe in a .inferconfig file. *) let is_thread_safe item_annot = let f ((annot : Annot.t), _) = - List.exists - ~f:(fun annot_string -> - Annotations.annot_ends_with annot annot_string || String.equal annot.class_name annot_string - ) - threadsafe_annotations + List.exists ~f:(Annotations.annot_ends_with annot) threadsafe_annotations && match annot.Annot.parameters with | [Annot.{name= Some "enableChecks"; value= "false"}] ->