[infer][java] no longer combine the type environment with the type environment of the models

Summary: This is no longer necessary

Reviewed By: sblackshear

Differential Revision: D5893926

fbshipit-source-id: 2f5f528
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent dfc15372c4
commit e17e157ae1

@ -14,7 +14,7 @@ import com.facebook.infer.builtins.InferUndefined;
import java.io.FileDescriptor; import java.io.FileDescriptor;
public abstract class Process { public class Process {
public Process(int pid, FileDescriptor in, FileDescriptor out, FileDescriptor err) { public Process(int pid, FileDescriptor in, FileDescriptor out, FileDescriptor err) {
InferBuiltins.__set_file_attribute(this); InferBuiltins.__set_file_attribute(this);

@ -28,17 +28,9 @@ abstract class ProcessManager {
FileDescriptor out = new FileDescriptor(); FileDescriptor out = new FileDescriptor();
FileDescriptor err = new FileDescriptor(); FileDescriptor err = new FileDescriptor();
ProcessImpl process = new ProcessImpl(InferUndefined.int_undefined(), in, out, err); return new Process(InferUndefined.int_undefined(), in, out, err);
return process;
} }
public static native ProcessManager getInstance(); public static native ProcessManager getInstance();
static class ProcessImpl extends Process {
ProcessImpl(int pid, FileDescriptor in, FileDescriptor out, FileDescriptor err) {
super(pid, in, out, err);
}
}
} }

@ -79,7 +79,6 @@ let load_tenv () =
(* Store to a file the type environment containing all the types required to perform the analysis *) (* Store to a file the type environment containing all the types required to perform the analysis *)
let save_tenv tenv = let save_tenv tenv =
if not Config.models_mode then JTransType.add_models_types tenv ;
(* TODO: this prevents per compilation step incremental analysis at this stage *) (* TODO: this prevents per compilation step incremental analysis at this stage *)
if DB.file_exists DB.global_tenv_fname then DB.file_remove DB.global_tenv_fname ; if DB.file_exists DB.global_tenv_fname then DB.file_remove DB.global_tenv_fname ;
L.(debug Capture Medium) "writing new tenv %s@." (DB.filename_to_string DB.global_tenv_fname) ; L.(debug Capture Medium) "writing new tenv %s@." (DB.filename_to_string DB.global_tenv_fname) ;

@ -174,7 +174,6 @@ codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.closeWithCloseab
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.closedQuietlyWithCloseables(), 5, UNINITIALIZED_VALUE, [start of procedure closedQuietlyWithCloseables(),exception java.io.IOException] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.closedQuietlyWithCloseables(), 5, UNINITIALIZED_VALUE, [start of procedure closedQuietlyWithCloseables(),exception java.io.IOException]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.closedWithCloseables(), 5, UNINITIALIZED_VALUE, [start of procedure closedWithCloseables(),exception java.io.IOException] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.closedWithCloseables(), 5, UNINITIALIZED_VALUE, [start of procedure closedWithCloseables(),exception java.io.IOException]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.contextObtainTypedArrayAndLeak(Context), 2, RESOURCE_LEAK, [start of procedure contextObtainTypedArrayAndLeak(...),start of procedure ignore(...),return from a call to void ResourceLeaks.ignore(TypedArray)] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.contextObtainTypedArrayAndLeak(Context), 2, RESOURCE_LEAK, [start of procedure contextObtainTypedArrayAndLeak(...),start of procedure ignore(...),return from a call to void ResourceLeaks.ignore(TypedArray)]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.copyFileLeak(File,File), 6, UNINITIALIZED_VALUE, [start of procedure copyFileLeak(...),exception java.io.IOException]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.copyFileLeak(File,File), 11, RESOURCE_LEAK, [start of procedure copyFileLeak(...),Skipping transferTo(...): unknown method,Taking true branch,exception java.io.IOException] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.copyFileLeak(File,File), 11, RESOURCE_LEAK, [start of procedure copyFileLeak(...),Skipping transferTo(...): unknown method,Taking true branch,exception java.io.IOException]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.copyFileLeak(File,File), 11, RESOURCE_LEAK, [start of procedure copyFileLeak(...),exception java.io.FileNotFoundException] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.copyFileLeak(File,File), 11, RESOURCE_LEAK, [start of procedure copyFileLeak(...),exception java.io.FileNotFoundException]
codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.deflaterLeak(), 1, RESOURCE_LEAK, [start of procedure deflaterLeak()] codetoanalyze/java/infer/ResourceLeaks.java, void ResourceLeaks.deflaterLeak(), 1, RESOURCE_LEAK, [start of procedure deflaterLeak()]

@ -25,7 +25,9 @@ codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionArrayLength(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionArrayLength(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionArrayLength()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionArrayLength(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionArrayLength(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionArrayLength()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod(), 3, java.lang.NullPointerException, [start of procedure nullPointerExceptionCallArrayReadMethod(),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionCallArrayReadMethod()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor(), 7, UNINITIALIZED_VALUE, [start of procedure nullPointerExceptionFromFailingFileOutputStreamConstructor(),exception java.io.FileNotFoundException,Switch condition is false. Skipping switch case]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor(), 9, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFailingFileOutputStreamConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor(), 9, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFailingFileOutputStreamConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFailingFileOutputStreamConstructor()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor(), 6, UNINITIALIZED_VALUE, [start of procedure nullPointerExceptionFromFaillingResourceConstructor(),exception java.io.FileNotFoundException,Switch condition is false. Skipping switch case]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor(), 8, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFaillingResourceConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor(), 8, java.lang.NullPointerException, [start of procedure nullPointerExceptionFromFaillingResourceConstructor(),Taking true branch,return from a call to void NullPointerExceptions.nullPointerExceptionFromFaillingResourceConstructor()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionUnlessFrameFails(), 6, java.lang.NullPointerException, [start of procedure nullPointerExceptionUnlessFrameFails(),start of procedure NullPointerExceptions$A(...),return from a call to NullPointerExceptions$A.<init>(NullPointerExceptions),start of procedure frame(...),start of procedure id_generics(...),Taking true branch,return from a call to Object NullPointerExceptions.id_generics(NullPointerExceptions$A),Taking true branch,return from a call to NullPointerExceptions$A NullPointerExceptions.frame(NullPointerExceptions$A),Taking true branch,exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionUnlessFrameFails()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionUnlessFrameFails(), 6, java.lang.NullPointerException, [start of procedure nullPointerExceptionUnlessFrameFails(),start of procedure NullPointerExceptions$A(...),return from a call to NullPointerExceptions$A.<init>(NullPointerExceptions),start of procedure frame(...),start of procedure id_generics(...),Taking true branch,return from a call to Object NullPointerExceptions.id_generics(NullPointerExceptions$A),Taking true branch,return from a call to NullPointerExceptions$A NullPointerExceptions.frame(NullPointerExceptions$A),Taking true branch,exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionUnlessFrameFails()]
codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter(), 2, java.lang.NullPointerException, [start of procedure nullPointerExceptionWithNullArrayParameter(),start of procedure expectNotNullArrayParameter(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.expectNotNullArrayParameter(codetoanalyze.java.infer.NullPointerExceptions$A[]),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter()] codetoanalyze/java/infer/NullPointerExceptions.java, void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter(), 2, java.lang.NullPointerException, [start of procedure nullPointerExceptionWithNullArrayParameter(),start of procedure expectNotNullArrayParameter(...),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.expectNotNullArrayParameter(codetoanalyze.java.infer.NullPointerExceptions$A[]),exception java.lang.NullPointerException,return from a call to void NullPointerExceptions.nullPointerExceptionWithNullArrayParameter()]

Loading…
Cancel
Save