From 366531bdf74e85df72ba434098a24e4e48504484 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 17 Jun 2015 21:11:24 +0200 Subject: [PATCH] Fix code style --- .../mail/ssl/DefaultTrustedSocketFactory.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/ssl/DefaultTrustedSocketFactory.java b/k9mail-library/src/main/java/com/fsck/k9/mail/ssl/DefaultTrustedSocketFactory.java index 7967d0dd3..c2a509dbe 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/ssl/DefaultTrustedSocketFactory.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/ssl/DefaultTrustedSocketFactory.java @@ -1,16 +1,5 @@ package com.fsck.k9.mail.ssl; -import android.content.Context; -import android.text.TextUtils; -import android.util.Log; - -import com.fsck.k9.mail.MessagingException; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; import java.io.IOException; import java.net.Socket; @@ -20,6 +9,17 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import android.content.Context; +import android.text.TextUtils; +import android.util.Log; + +import com.fsck.k9.mail.MessagingException; +import javax.net.ssl.KeyManager; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManager; + import static com.fsck.k9.mail.K9MailLib.LOG_TAG; @@ -27,10 +27,10 @@ import static com.fsck.k9.mail.K9MailLib.LOG_TAG; * Filter and reorder list of cipher suites and TLS versions. */ public class DefaultTrustedSocketFactory implements TrustedSocketFactory { - protected static final String ENABLED_CIPHERS[]; - protected static final String ENABLED_PROTOCOLS[]; + protected static final String[] ENABLED_CIPHERS; + protected static final String[] ENABLED_PROTOCOLS; - protected static final String ORDERED_KNOWN_CIPHERS[] = { + protected static final String[] ORDERED_KNOWN_CIPHERS = { "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", @@ -76,7 +76,7 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory { "SSL_RSA_WITH_RC4_128_MD5", }; - protected static final String ORDERED_KNOWN_PROTOCOLS[] = { + protected static final String[] ORDERED_KNOWN_PROTOCOLS = { "TLSv1.2", "TLSv1.1", "TLSv1" }; @@ -110,7 +110,7 @@ public class DefaultTrustedSocketFactory implements TrustedSocketFactory { reorder(enabledCiphers, ORDERED_KNOWN_CIPHERS, BLACKLISTED_CIPHERS); ENABLED_PROTOCOLS = (supportedProtocols == null) ? null : - reorder(supportedProtocols, ORDERED_KNOWN_PROTOCOLS, BLACKLISTED_PROTOCOLS); + reorder(supportedProtocols, ORDERED_KNOWN_PROTOCOLS, BLACKLISTED_PROTOCOLS); } public DefaultTrustedSocketFactory(Context context) {