From 961872edf034979721b123b56829dc47b167dc0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Fri, 6 Jul 2012 14:23:50 +0200 Subject: [PATCH] combined nested if statements in ImapStore --- src/com/fsck/k9/mail/store/ImapStore.java | 26 +++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 77251333b..ce56619d5 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -2204,21 +2204,19 @@ public class ImapStore extends Store { capabilityList = response; } - if (capabilityList != null) { - if (!capabilityList.isEmpty() && ImapResponseParser.equalsIgnoreCase(capabilityList.get(0), CAPABILITY_CAPABILITY)) { - if (K9.DEBUG) { - Log.d(K9.LOG_TAG, "Saving " + capabilityList.size() + " capabilities for " + getLogId()); + if (capabilityList != null && !capabilityList.isEmpty() && + ImapResponseParser.equalsIgnoreCase(capabilityList.get(0), CAPABILITY_CAPABILITY)) { + if (K9.DEBUG) { + Log.d(K9.LOG_TAG, "Saving " + capabilityList.size() + " capabilities for " + getLogId()); + } + for (Object capability : capabilityList) { + if (capability instanceof String) { +// if (K9.DEBUG) +// { +// Log.v(K9.LOG_TAG, "Saving capability '" + capability + "' for " + getLogId()); +// } + capabilities.add(((String)capability).toUpperCase(Locale.US)); } - for (Object capability : capabilityList) { - if (capability instanceof String) { -// if (K9.DEBUG) -// { -// Log.v(K9.LOG_TAG, "Saving capability '" + capability + "' for " + getLogId()); -// } - capabilities.add(((String)capability).toUpperCase(Locale.US)); - } - } - } } }