no longer fail when the type of an execption is not found in the type environement

Summary:
public
Avoid the analysis to fail when the type of an exception cannot be found in the type environement

Reviewed By: sblackshear

Differential Revision: D2743015

fb-gh-sync-id: 7b922eb
master
jrm 9 years ago committed by facebook-github-bot-5
parent c8b80f2435
commit 24d28c6858

@ -374,19 +374,15 @@ let get_lifecycles = android_lifecycles
(** Checks if the exception is an uncheched exception *) (** Checks if the exception is an uncheched exception *)
let is_runtime_exception tenv exn = let is_runtime_exception tenv exn =
let runtime_exception_opt = let lookup = Sil.tenv_lookup tenv in
let runtime_exception_typename =
let name = Mangled.from_package_class "java.lang" "RuntimeException" in let name = Mangled.from_package_class "java.lang" "RuntimeException" in
let typename = Sil.TN_csu (Sil.Class, name) in Sil.TN_csu (Sil.Class, name)
Sil.tenv_lookup tenv typename in and exn_typename = Sil.TN_csu (Sil.Class, exn) in
match Sil.tenv_lookup tenv (Sil.TN_csu (Sil.Class, exn)) with match lookup runtime_exception_typename, lookup exn_typename with
| None -> assert false | Some runtime_exception_type, Some exn_type ->
| Some exn_type -> is_subtype exn_type runtime_exception_type tenv
begin | _ -> false
match runtime_exception_opt with
| None -> false
| Some runtime_exception_type ->
is_subtype exn_type runtime_exception_type tenv
end
let non_stub_android_jar () = let non_stub_android_jar () =

Loading…
Cancel
Save