@SuppressWarnings("deprecation")
	private void setLegacyConnectionTimeout(HttpClient client, int timeout) {
		if (org.apache.http.impl.client.AbstractHttpClient.class.isInstance(client)) {
			client.getParams().setIntParameter(
					org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT, timeout);
		}
	}
@ SuppressWarnings ( "deprecation" ) private void setLegacyConnectionTimeout ( HttpClient client , int timeout ) { if ( org . apache . http . impl . client . AbstractHttpClient . class . isInstance ( client ) ) { client . getParams ( ) . setIntParameter ( org . apache . http . params . CoreConnectionPNames . CONNECTION_TIMEOUT , timeout ) ; } }
Apply the specified connection timeout to deprecated {@link HttpClient}
implementations.
<p>
As of HttpClient 4.3, default parameters have to be exposed through a
{@link RequestConfig} instance instead of setting the parameters on the client.
Unfortunately, this behavior is not backward-compatible and older
{@link HttpClient} implementations will ignore the {@link RequestConfig} object set
in the context.
<p>
If the specified client is an older implementation, we set the custom connection
timeout through the deprecated API. Otherwise, we just return as it is set through
{@link RequestConfig} with newer clients.
@param client the client to configure
@param timeout the custom connection timeout