[infer][java] removing no longer used code which can now be handled using .inferconfig

Reviewed By: sblackshear

Differential Revision: D4056719

fbshipit-source-id: 5b474d8
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent 2605ef8d6f
commit e13c3886bf

@ -707,11 +707,7 @@ let rec instruction (context : JContext.t) pc instr : translation =
let create_node node_kind sil_instrs =
Cfg.Node.create cfg loc node_kind sil_instrs context.procdesc in
let return_not_null () =
match_never_null loc.Location.file proc_name
||
IList.exists
(fun pnj -> Procname.equal (Procname.Java pnj) proc_name)
JTransType.never_returning_null in
match_never_null loc.Location.file proc_name in
let trans_monitor_enter_exit context expr pc loc builtin node_desc =
let instrs, sil_expr, sil_type = expression context pc expr in
let builtin_const = Exp.Const (Const.Cfun builtin) in

@ -436,23 +436,3 @@ let add_models_types tenv =
if not (Tenv.mem t typename) then
Tenv.add tenv typename struct_typ in
Tenv.iter (add_type tenv) !JClasspath.models_tenv
(* TODO #6604630: remove *)
let never_returning_null =
(* class, method name, [arg type], ret_type of methods to model as never returning null *)
let fragment_type = "android.support.v4.app.Fragment" in
let never_null_method_sigs =
[
(fragment_type, "getContext", [], "android.content.Context", Procname.Non_Static);
(fragment_type, "getActivity", [], "android.support.v4.app.FragmentActivity", Procname.Non_Static)
] in
let make_procname = function
| (class_name, method_name, arg_types, ret_type, kind) ->
let return_cn = JBasics.make_cn ret_type in
let cn = JBasics.make_cn class_name
and ms =
JBasics.make_ms
method_name arg_types (Some (JBasics.TObject (JBasics.TClass return_cn))) in
get_method_procname cn ms kind in
IList.map make_procname never_null_method_sigs

@ -93,6 +93,3 @@ val cn_to_java_type : JBasics.class_name -> Procname.java_type
(** Add the types of the models to the type environment passed as parameter *)
val add_models_types : Tenv.t -> unit
(** list of methods that are never returning null *)
val never_returning_null : Procname.java list

Loading…
Cancel
Save