diff --git a/infer/src/absint/PatternMatch.ml b/infer/src/absint/PatternMatch.ml index f8035ea33..3d7944ce5 100644 --- a/infer/src/absint/PatternMatch.ml +++ b/infer/src/absint/PatternMatch.ml @@ -372,7 +372,7 @@ let override_find ?(check_current_type = true) f tenv proc_name = else match proc_name with | Procname.Java proc_name_java -> - find_super_type (Typ.Name.Java.from_string (Procname.Java.get_class_name proc_name_java)) + find_super_type (Procname.Java.get_class_type_name proc_name_java) | Procname.ObjC_Cpp proc_name_cpp -> find_super_type (Procname.ObjC_Cpp.get_class_type_name proc_name_cpp) | _ -> diff --git a/infer/src/checkers/annotationReachability.ml b/infer/src/checkers/annotationReachability.ml index d1dcb50e1..66bcec2ef 100644 --- a/infer/src/checkers/annotationReachability.ml +++ b/infer/src/checkers/annotationReachability.ml @@ -26,7 +26,7 @@ let is_modeled_expensive tenv = function (not (BuiltinDecl.is_declared proc_name)) && let is_subclass = - let classname = Typ.Name.Java.from_string (Procname.Java.get_class_name proc_name_java) in + let classname = Procname.Java.get_class_type_name proc_name_java in PatternMatch.is_subtype_of_str tenv classname in Inferconfig.modeled_expensive_matcher is_subclass proc_name @@ -38,7 +38,7 @@ let is_allocator tenv pname = match pname with | Procname.Java pname_java -> let is_throwable () = - let class_name = Typ.Name.Java.from_string (Procname.Java.get_class_name pname_java) in + let class_name = Procname.Java.get_class_type_name pname_java in PatternMatch.is_throwable tenv class_name in Procname.is_constructor pname diff --git a/infer/src/checkers/fragmentRetainsViewChecker.ml b/infer/src/checkers/fragmentRetainsViewChecker.ml index 33e7a8d5c..a26191251 100644 --- a/infer/src/checkers/fragmentRetainsViewChecker.ml +++ b/infer/src/checkers/fragmentRetainsViewChecker.ml @@ -64,7 +64,7 @@ let callback_fragment_retains_view_java java_pname {Callbacks.summary; exe_env} Typ.Name.equal fld_classname class_typename && fld_typ_is_view fld_typ in if is_on_destroy_view then - let class_name = Typ.Name.Java.from_string (Procname.Java.get_class_name java_pname) in + let class_name = Procname.Java.get_class_type_name java_pname in match Tenv.lookup tenv class_name with | Some {fields} when AndroidFramework.is_fragment tenv class_name -> let declared_view_fields = List.filter ~f:(is_declared_view_typ class_name) fields in diff --git a/infer/src/labs/00_dummy_checker/ResourceLeaks.ml b/infer/src/labs/00_dummy_checker/ResourceLeaks.ml index 880c8f49b..949bebcef 100644 --- a/infer/src/labs/00_dummy_checker/ResourceLeaks.ml +++ b/infer/src/labs/00_dummy_checker/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/01_integer_domain/ResourceLeaks.ml b/infer/src/labs/01_integer_domain/ResourceLeaks.ml index 8d51fd9cb..d0932c97d 100644 --- a/infer/src/labs/01_integer_domain/ResourceLeaks.ml +++ b/infer/src/labs/01_integer_domain/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/02_domain_join/ResourceLeaks.ml b/infer/src/labs/02_domain_join/ResourceLeaks.ml index 8d51fd9cb..d0932c97d 100644 --- a/infer/src/labs/02_domain_join/ResourceLeaks.ml +++ b/infer/src/labs/02_domain_join/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/03_domain_top/ResourceLeaks.ml b/infer/src/labs/03_domain_top/ResourceLeaks.ml index 8d51fd9cb..d0932c97d 100644 --- a/infer/src/labs/03_domain_top/ResourceLeaks.ml +++ b/infer/src/labs/03_domain_top/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/04_interprocedural/ResourceLeaks.ml b/infer/src/labs/04_interprocedural/ResourceLeaks.ml index 0d02c5b3e..7d008533c 100644 --- a/infer/src/labs/04_interprocedural/ResourceLeaks.ml +++ b/infer/src/labs/04_interprocedural/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/05_access_paths_interprocedural/ResourceLeaks.ml b/infer/src/labs/05_access_paths_interprocedural/ResourceLeaks.ml index 5e2d94eaf..9ef4743b2 100644 --- a/infer/src/labs/05_access_paths_interprocedural/ResourceLeaks.ml +++ b/infer/src/labs/05_access_paths_interprocedural/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/labs/ResourceLeaks.ml b/infer/src/labs/ResourceLeaks.ml index 21219081c..706f0c867 100644 --- a/infer/src/labs/ResourceLeaks.ml +++ b/infer/src/labs/ResourceLeaks.ml @@ -36,8 +36,7 @@ module TransferFunctions (CFG : ProcCfg.S) = struct let is_closeable_procname tenv procname = match procname with | Procname.Java java_procname -> - is_closeable_typename tenv - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_procname)) + is_closeable_typename tenv (Procname.Java.get_class_type_name java_procname) | _ -> false diff --git a/infer/src/quandary/JavaTrace.ml b/infer/src/quandary/JavaTrace.ml index 9a95d81b9..43078cb2e 100644 --- a/infer/src/quandary/JavaTrace.ml +++ b/infer/src/quandary/JavaTrace.ml @@ -136,7 +136,7 @@ module SourceKind = struct get_external_source class_name method_name in PatternMatch.supertype_find_map_opt tenv taint_matching_supertype - (Typ.Name.Java.from_string (Procname.Java.get_class_name pname)) + (Procname.Java.get_class_type_name pname) |> Option.value ~default:[] | Procname.C _ when Procname.equal pname BuiltinDecl.__global_access -> ( (* accessed global will be passed to us as the only parameter *) @@ -249,7 +249,7 @@ module SourceKind = struct in match PatternMatch.supertype_find_map_opt tenv taint_matching_supertype - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_pname)) + (Procname.Java.get_class_type_name java_pname) with | Some tainted_formals -> tainted_formals @@ -480,7 +480,7 @@ module SinkKind = struct get_external_sink class_name method_name in PatternMatch.supertype_find_map_opt tenv taint_matching_supertype - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_pname)) + (Procname.Java.get_class_type_name java_pname) |> Option.value ~default:[] | pname when BuiltinDecl.is_declared pname -> [] @@ -557,7 +557,7 @@ module JavaSanitizer = struct get_external_sanitizer class_name method_name in PatternMatch.supertype_find_map_opt tenv sanitizer_matching_supertype - (Typ.Name.Java.from_string (Procname.Java.get_class_name java_pname)) + (Procname.Java.get_class_type_name java_pname) | _ -> None