mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
ignore redundant calls to File{In|Out}putStream.close
Previously, we threw an IOException, which did not match Sun's behavior.
This commit is contained in:
parent
9a056da2f7
commit
585dba004b
@ -55,7 +55,9 @@ public class FileInputStream extends InputStream {
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
close(fd);
|
||||
fd = -1;
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
fd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,9 @@ public class FileOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
close(fd);
|
||||
fd = -1;
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
fd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user