mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 05:02:26 -05:00
Merge pull request #90 from andrewgaul/close-quietly
Call IOUtils.closeQuietly instead of using empty try/catch block.
This commit is contained in:
commit
d80e5bfbd0
@ -90,6 +90,7 @@ import com.jcraft.jzlib.JZlib;
|
|||||||
import com.jcraft.jzlib.ZOutputStream;
|
import com.jcraft.jzlib.ZOutputStream;
|
||||||
import java.util.zip.Inflater;
|
import java.util.zip.Inflater;
|
||||||
import java.util.zip.InflaterInputStream;
|
import java.util.zip.InflaterInputStream;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -2167,21 +2168,9 @@ public class ImapStore extends Store {
|
|||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
try {
|
IOUtils.closeQuietly(mIn);
|
||||||
mIn.close();
|
IOUtils.closeQuietly(mOut);
|
||||||
} catch (Exception e) {
|
IOUtils.closeQuietly(mSocket);
|
||||||
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
mOut.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
mSocket.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
mIn = null;
|
mIn = null;
|
||||||
mOut = null;
|
mOut = null;
|
||||||
mSocket = null;
|
mSocket = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user