diff --git a/src/main/java/microsoft/exchange/webservices/data/core/EwsSSLProtocolSocketFactory.java b/src/main/java/microsoft/exchange/webservices/data/core/EwsSSLProtocolSocketFactory.java index 4fd163022..1dea591ea 100644 --- a/src/main/java/microsoft/exchange/webservices/data/core/EwsSSLProtocolSocketFactory.java +++ b/src/main/java/microsoft/exchange/webservices/data/core/EwsSSLProtocolSocketFactory.java @@ -148,18 +148,18 @@ public static EwsSSLProtocolSocketFactory build( SSLContext sslContext = createSslContext(trustManager); //read system properties - String[] keepAliveStrategyCopy = null; + String[] keepAliveStrategyCopy; keepAliveStrategyCopy = split(System.getProperty("https.protocols")); - String[] targetAuthStrategyCopy = null; + String[] targetAuthStrategyCopy; targetAuthStrategyCopy = split(System.getProperty("https.cipherSuites")); - if(null != keepAliveStrategyCopy || null != targetAuthStrategyCopy) { + if (null != keepAliveStrategyCopy || null != targetAuthStrategyCopy) { return new EwsSSLProtocolSocketFactory(sslContext,keepAliveStrategyCopy,targetAuthStrategyCopy, hostnameVerifier); } else { return new EwsSSLProtocolSocketFactory(sslContext, hostnameVerifier); } - } + private static String[] split(String s) { return TextUtils.isBlank(s)?null:s.split(" *, *"); }