From 00528f5d24d176c980771330fe95a1034461c903 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 16 Mar 2015 13:11:01 +0100 Subject: [PATCH] Move throw statement outside of switch body This way static analysis can detect when we're missing a switch case. --- k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java b/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java index 61db90546..fddb456a8 100644 --- a/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java +++ b/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java @@ -37,9 +37,8 @@ public class AccountCreator { case SSL_TLS_REQUIRED: { return storeType.defaultTlsPort; } - default: { - throw new AssertionError("Unhandled ConnectionSecurity type encountered: " + securityType); - } } + + throw new AssertionError("Unhandled ConnectionSecurity type encountered: " + securityType); } }