[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;
@ -19,16 +19,12 @@ public class FilterOutputStream extends OutputStream {
}
public FilterOutputStream(OutputStream out) {
this.out = out;
this.out = out;
}
public void close() throws IOException {
if (out != null) {
if (out instanceof FileOutputStream) {
((FileOutputStream) out).close();
} else {
out.close();
}
out.close();
}
}

@ -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,20 +17,21 @@ import java.io.OutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class JarOutputStream extends ZipOutputStream {
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
super(out);
InferUndefined.can_throw_ioexception_void();
}
public class JarOutputStream {
public JarOutputStream(OutputStream out) throws IOException {
super(out);
InferUndefined.can_throw_ioexception_void();
}
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
this(out);
}
public void putNextEntry(ZipEntry ze) throws IOException {
InferUndefined.can_throw_ioexception_void();
}
public JarOutputStream(OutputStream out) throws IOException {
InferUndefined.can_throw_ioexception_void();
InferBuiltins.__set_mem_attribute(out);
InferBuiltins.__set_file_attribute(this);
}
public void putNextEntry(ZipEntry ze) throws IOException {
InferUndefined.can_throw_ioexception_void();
}
}

@ -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