From b1a807a712734ca892a47af1b11f27fce6389595 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 2 Nov 2011 22:22:10 -0700 Subject: [PATCH] Call IOUtils.closeQuietly where appropriate --- src/com/fsck/k9/mail/store/ImapStore.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 4c22e812b..cc89d0a2f 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -90,6 +90,7 @@ import com.jcraft.jzlib.JZlib; import com.jcraft.jzlib.ZOutputStream; import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; +import org.apache.commons.io.IOUtils; /** *
@@ -2166,21 +2167,9 @@ public class ImapStore extends Store {
 //
 //                }
 //            }
-            try {
-                mIn.close();
-            } catch (Exception e) {
-
-            }
-            try {
-                mOut.close();
-            } catch (Exception e) {
-
-            }
-            try {
-                mSocket.close();
-            } catch (Exception e) {
-
-            }
+            IOUtils.closeQuietly(mIn);
+            IOUtils.closeQuietly(mOut);
+            IOUtils.closeQuietly(mSocket);
             mIn = null;
             mOut = null;
             mSocket = null;