Skip to content

Commit f8807c7

Browse files
committed
Code cleanup.
1 parent 755591f commit f8807c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/resources/android-java/apiInvoker.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public class ApiInvoker {
209209
}
210210

211211
private HttpClient getClient(String host) {
212-
if(client == null) {
212+
if (client == null) {
213213
if (ignoreSSLCertificates && ignoreSSLConnectionManager != null) {
214214
// Trust self signed certificates
215215
client = new DefaultHttpClient(ignoreSSLConnectionManager, new BasicHttpParams());
@@ -260,7 +260,8 @@ public class ApiInvoker {
260260
} catch (KeyManagementException e) {
261261
// This might be thrown when passing a key into init(), but no key is being passed.
262262
} catch (GeneralSecurityException e) {
263-
throw new RuntimeException("Couldn't Init SSLSocketFactory: " + e.getMessage(), e);
263+
// This catches anything else that might go wrong.
264+
// If anything goes wrong we default to the standard connection manager.
264265
}
265266
}
266267
}

0 commit comments

Comments
 (0)