From d390568aed9d9efe7bd6cffe2cb42b8e51317489 Mon Sep 17 00:00:00 2001 From: jrm Date: Mon, 14 Dec 2015 12:27:13 -0800 Subject: [PATCH] to avoid redundancy, no longer print the name of the class when printing the name of a constructor Summary: public The function `Procname.to_simplified_string ~withclass:true` used to print `MyClass.MyClass()` when printing the name of a Java constructor. It now prints `MyClass()`. I made a separate diff for this changes as it affects the bug hash, especially for resource leaks. Reviewed By: sblackshear Differential Revision: D2748661 fb-gh-sync-id: 9f51871 --- infer/src/backend/procname.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infer/src/backend/procname.ml b/infer/src/backend/procname.ml index 8c45db973..3edec15e8 100644 --- a/infer/src/backend/procname.ml +++ b/infer/src/backend/procname.ml @@ -303,9 +303,11 @@ let java_to_string ?(withclass = false) j verbosity = | [] -> "" | _ -> "..." in let method_name = - if j.method_name = "" then java_get_simple_class (Java_method j) - else j.method_name in - cls_prefix ^ method_name ^ "(" ^ params ^ ")" + if j.method_name = "" then + java_get_simple_class (Java_method j) + else + cls_prefix ^ j.method_name in + method_name ^ "(" ^ params ^ ")" (** Check if the class name is for an anonymous inner class. *) let is_anonymous_inner_class_name class_name =