[infer][java] Adding the android.jar in the classpath is not needed anymore

Summary:
This is legacy code that dates back from when we needed the fields in the models to match exactly the fields in the classes being modeled. We no longer need to this. Besides, it seems that this `android.jar` stopped being part of the release for a while. So this change will not affect the results in prod

I check in details the difference on the code of Guava and it seems to remove (weird) false positives only.

Reviewed By: sblackshear

Differential Revision: D4242444

fbshipit-source-id: 84dd782
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent e212183e7e
commit d89c69dbe6

@ -106,7 +106,3 @@ let get_lifecycle_for_framework_typ_opt tenv lifecycle_typ lifecycle_proc_strs =
(** return the complete list of (package, lifecycle_classname, lifecycle_methods) trios *)
let get_lifecycles = android_lifecycles
let non_stub_android_jar () =
let root_dir = Filename.dirname (Filename.dirname Sys.executable_name) in
IList.fold_left Filename.concat root_dir ["lib"; "java"; "android"; "android-19.jar"]

@ -37,6 +37,3 @@ val get_lifecycle_for_framework_typ_opt : Tenv.t -> Typename.t -> string list ->
(** return true if [class_name] is the name of a class that belong to the Android framework *)
val is_android_lib_class : Typename.t -> bool
(** Path to the android.jar file containing real code, not just the method stubs as in the SDK *)
val non_stub_android_jar : unit -> string

@ -72,11 +72,6 @@ let is_model procname =
let split_classpath cp = Str.split (Str.regexp JFile.sep) cp
(** Add the android.jar containing bytecode at the beginning of the class path *)
let add_android_jar paths =
AndroidFramework.non_stub_android_jar () :: paths
let append_path classpath path =
if Sys.file_exists path then
let full_path = filename_to_absolute path in
@ -188,7 +183,7 @@ let load_from_verbose_output () =
IList.fold_left
append_path
""
((StringSet.elements roots) @ (add_android_jar paths)) in
((StringSet.elements roots) @ paths) in
(classpath, sources, classes) in
loop [] StringSet.empty StringMap.empty JBasics.ClassSet.empty

Loading…
Cancel
Save