From f8807c7440efb8c29362d48af17d82484ee1a364 Mon Sep 17 00:00:00 2001 From: Andrew Young Date: Wed, 8 Jan 2014 15:21:55 -0800 Subject: [PATCH] Code cleanup. --- src/main/resources/android-java/apiInvoker.mustache | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/resources/android-java/apiInvoker.mustache b/src/main/resources/android-java/apiInvoker.mustache index cd4aa5498a4..81696c572d0 100644 --- a/src/main/resources/android-java/apiInvoker.mustache +++ b/src/main/resources/android-java/apiInvoker.mustache @@ -209,7 +209,7 @@ public class ApiInvoker { } private HttpClient getClient(String host) { - if(client == null) { + if (client == null) { if (ignoreSSLCertificates && ignoreSSLConnectionManager != null) { // Trust self signed certificates client = new DefaultHttpClient(ignoreSSLConnectionManager, new BasicHttpParams()); @@ -260,7 +260,8 @@ public class ApiInvoker { } catch (KeyManagementException e) { // This might be thrown when passing a key into init(), but no key is being passed. } catch (GeneralSecurityException e) { - throw new RuntimeException("Couldn't Init SSLSocketFactory: " + e.getMessage(), e); + // This catches anything else that might go wrong. + // If anything goes wrong we default to the standard connection manager. } } }