From 5769e8bfeb5e018b09f5899927772b8743a90803 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 26 Mar 2019 07:36:32 -0700 Subject: [PATCH] [infer][racerd] use markup formatting for the Interface Not Thread Safe error message Reviewed By: ngorogiannis Differential Revision: D14602388 fbshipit-source-id: 1c36ac749 --- infer/src/concurrency/RacerD.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/concurrency/RacerD.ml b/infer/src/concurrency/RacerD.ml index 837704e10..489213b92 100644 --- a/infer/src/concurrency/RacerD.ml +++ b/infer/src/concurrency/RacerD.ml @@ -765,9 +765,10 @@ let report_unannotated_interface_violation reported_pname (reported_access : rep let class_name = Typ.Procname.Java.get_class_name java_pname in let make_description _ _ _ _ = F.asprintf - "Unprotected call to method %a of un-annotated interface %s. Consider annotating the \ + "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." - Typ.Procname.pp reported_pname class_name MF.pp_monospaced "@ThreadSafe" + (MF.wrap_monospaced Typ.Procname.pp) + reported_pname MF.pp_monospaced class_name MF.pp_monospaced "@ThreadSafe" in report_thread_safety_violation ~make_description ~report_kind:UnannotatedInterface reported_access