Source:
public IClient build() { try { TrustManagerFactory trustManagerFactory = initTrustManagerFactory(certificateAlias, certificate); X509TrustManager trustManager = getCurrentTrustManager(trustManagerFactory); SSLContext sslContext = SSLUtils.getSSLContext(trustManager); ResponseCodeInterceptor responseCodeInterceptor = new ResponseCodeInterceptor(); OpenShiftAuthenticator authenticator = new OpenShiftAuthenticator(); Dispatcher dispatcher = new Dispatcher(); dispatcher.setMaxRequests(maxRequests); dispatcher.setMaxRequestsPerHost(maxRequestsPerHost); OkHttpClient.Builder builder = null; if (!this.sslCertCallbackWithDefaultHostnameVerifier) { builder = new OkHttpClient.Builder() .addInterceptor(responseCodeInterceptor) .authenticator(authenticator) .dispatcher(dispatcher) .readTimeout(readTimeout, readTimeoutUnit) .writeTimeout(writeTimeout, writeTimeoutUnit) .connectTimeout(connectTimeout, connectTimeoutUnit) .hostnameVerifier(this.sslCertificateCallback) .sslSocketFactory(sslContext.getSocketFactory(), trustManager); } else { builder = new OkHttpClient.Builder() .addInterceptor(responseCodeInterceptor) .authenticator(authenticator) .dispatcher(dispatcher) .readTimeout(readTimeout, readTimeoutUnit) .writeTimeout(writeTimeout, writeTimeoutUnit) .connectTimeout(connectTimeout, connectTimeoutUnit) .sslSocketFactory(sslContext.getSocketFactory(), trustManager); } if (proxyAuthenticator != null) { builder.proxyAuthenticator(proxyAuthenticator); } OkHttpClient okClient = builder.build(); IResourceFactory factory = defaultIfNull(resourceFactory, new ResourceFactory(null)); AuthorizationContext authContext = new AuthorizationContext(token, userName, password); DefaultClient client = new DefaultClient(new URL(this.baseUrl), okClient, factory, null, authContext); authContext.setClient(client); responseCodeInterceptor.setClient(client); authenticator.setClient(client); authenticator.setOkClient(okClient); return client; } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e) { throw new OpenShiftException(e, "Unable to initialize client"); } }

Target:
public IClient build() { try { TrustManagerFactory trustManagerFactory = initTrustManagerFactory(certificateAlias, certificate); X509TrustManager trustManager = getCurrentTrustManager(trustManagerFactory); SSLContext sslContext = SSLUtils.getSSLContext(trustManager); ResponseCodeInterceptor responseCodeInterceptor = new ResponseCodeInterceptor(); OpenShiftAuthenticator authenticator = new OpenShiftAuthenticator(); Dispatcher dispatcher = new Dispatcher(); dispatcher.setMaxRequests(maxRequests); dispatcher.setMaxRequestsPerHost(maxRequestsPerHost); OkHttpClient.Builder builder = new OkHttpClient.Builder() .addInterceptor(responseCodeInterceptor) .authenticator(authenticator) .dispatcher(dispatcher) .readTimeout(readTimeout, readTimeoutUnit) .writeTimeout(writeTimeout, writeTimeoutUnit) .connectTimeout(connectTimeout, connectTimeoutUnit) .sslSocketFactory(sslContext.getSocketFactory(), trustManager); if (!this.sslCertCallbackWithDefaultHostnameVerifier) builder.hostnameVerifier(sslCertificateCallback); if (proxyAuthenticator != null) { builder.proxyAuthenticator(proxyAuthenticator); } OkHttpClient okClient = builder.build(); IResourceFactory factory = defaultIfNull(resourceFactory, new ResourceFactory(null)); AuthorizationContext authContext = new AuthorizationContext(token, userName, password); DefaultClient client = new DefaultClient(new URL(this.baseUrl), okClient, factory, null, authContext); authContext.setClient(client); responseCodeInterceptor.setClient(client); authenticator.setClient(client); authenticator.setOkClient(okClient); return client; } catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e) { throw new OpenShiftException(e, "Unable to initialize client"); } }