diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 3f72117b9..4e2536908 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -789,6 +789,7 @@ and debug_exceptions = and dependencies = CLOpt.mk_bool ~deprecated:["dependencies"] ~long:"dependencies" + ~exes:CLOpt.[Java] "Translate all the dependencies during the capture. The classes in the given jar file will be \ translated. No sources needed." diff --git a/infer/src/java/jFrontend.ml b/infer/src/java/jFrontend.ml index 73308f4ad..6d04d6da9 100644 --- a/infer/src/java/jFrontend.ml +++ b/infer/src/java/jFrontend.ml @@ -148,7 +148,8 @@ let is_classname_cached cn = in this case translates it. In standard mode, all methods are translated *) let create_icfg source_file linereader program icfg cn node = JUtils.log "\tclassname: %s@." (JBasics.cn_name cn); - cache_classname cn; + if Config.dependency_mode && not (is_classname_cached cn) then + cache_classname cn; let translate m = (* each procedure has different scope: start names from id 0 *) Ident.NameGenerator.reset ();