From dfb19d7c3e6d99117d1d732c7c51209148a3bd07 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Fri, 27 Mar 2020 06:45:45 -0700 Subject: [PATCH] [racerd] improve interface not thread safe report text Summary: The text is ambiguous because it sounds as if it recommends annotating the current class as `ThreadSafe`, not the interface invoked. Also, remove the not useful part "or using an interface known to be thread-safe" because developers don't know in general what interfaces Infer thinks are thread-safe. Reviewed By: skcho Differential Revision: D20675729 fbshipit-source-id: 9da438621 --- infer/src/concurrency/RacerD.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/concurrency/RacerD.ml b/infer/src/concurrency/RacerD.ml index 91a390a9e..6e146cf6d 100644 --- a/infer/src/concurrency/RacerD.ml +++ b/infer/src/concurrency/RacerD.ml @@ -680,7 +680,7 @@ let report_unannotated_interface_violation ~issue_log reported_pname reported_ac let make_description _ _ _ _ = F.asprintf "Unprotected call to method %a of un-annotated interface %a. Consider annotating the \ - class with %a, adding a lock, or using an interface that is known to be thread-safe." + interface with %a or adding a lock." describe_pname reported_pname MF.pp_monospaced class_name MF.pp_monospaced "@ThreadSafe" in report_thread_safety_violation ~issue_log ~make_description ~report_kind:UnannotatedInterface