[infer][java] Simplify some of the models of Java resources [4/n]

Reviewed By: sblackshear

Differential Revision: D4542437

fbshipit-source-id: 018cbf8
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent 2ded1d7a0c
commit 1065be3286

@ -11,7 +11,7 @@ package java.io;
import com.facebook.infer.builtins.InferUndefined;
public class FilterOutputStream extends OutputStream {
public class FilterOutputStream {
protected OutputStream out;
@ -24,13 +24,9 @@ public class FilterOutputStream extends OutputStream {
public void close() throws IOException {
if (out != null) {
if (out instanceof FileOutputStream) {
((FileOutputStream) out).close();
} else {
out.close();
}
}
}
public void flush() throws IOException {
InferUndefined.can_throw_ioexception_void();

@ -9,6 +9,7 @@
package java.util.jar;
import com.facebook.infer.builtins.InferBuiltins;
import com.facebook.infer.builtins.InferUndefined;
import java.io.IOException;
@ -16,16 +17,17 @@ import java.io.OutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class JarOutputStream extends ZipOutputStream {
public class JarOutputStream {
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
super(out);
InferUndefined.can_throw_ioexception_void();
this(out);
}
public JarOutputStream(OutputStream out) throws IOException {
super(out);
InferUndefined.can_throw_ioexception_void();
InferBuiltins.__set_mem_attribute(out);
InferBuiltins.__set_file_attribute(this);
}
public void putNextEntry(ZipEntry ze) throws IOException {

@ -17,11 +17,7 @@ import java.io.OutputStream;
import com.facebook.infer.builtins.InferUndefined;
public class ZipOutputStream extends DeflaterOutputStream {
public ZipOutputStream(OutputStream out) {
super(out);
}
public class ZipOutputStream {
public void putNextEntry(ZipEntry e) throws IOException {
InferUndefined.can_throw_ioexception_void();
@ -31,13 +27,4 @@ public class ZipOutputStream extends DeflaterOutputStream {
InferUndefined.can_throw_ioexception_void();
}
public void close() throws IOException {
if (out != null) {
if (out instanceof FileOutputStream) {
((FileOutputStream) out).close();
} else if (out instanceof BufferedOutputStream) {
((BufferedOutputStream) out).close();
}
}
}
}

Loading…
Cancel
Save