HttpClientContext.java (httpcomponents-client-4.5.6-src) | : | HttpClientContext.java (httpcomponents-client-4.5.7-src) | ||
---|---|---|---|---|
skipping to change at line 137 | skipping to change at line 137 | |||
*/ | */ | |||
public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry "; | public static final String AUTHSCHEME_REGISTRY = "http.authscheme-registry "; | |||
/** | /** | |||
* Attribute name of a {@link org.apache.http.client.config.RequestConfig} o bject that | * Attribute name of a {@link org.apache.http.client.config.RequestConfig} o bject that | |||
* represents the actual request configuration. | * represents the actual request configuration. | |||
*/ | */ | |||
public static final String REQUEST_CONFIG = "http.request-config"; | public static final String REQUEST_CONFIG = "http.request-config"; | |||
public static HttpClientContext adapt(final HttpContext context) { | public static HttpClientContext adapt(final HttpContext context) { | |||
if (context instanceof HttpClientContext) { | return context instanceof HttpClientContext | |||
return (HttpClientContext) context; | ? (HttpClientContext) context | |||
} else { | : new HttpClientContext(context); | |||
return new HttpClientContext(context); | ||||
} | ||||
} | } | |||
public static HttpClientContext create() { | public static HttpClientContext create() { | |||
return new HttpClientContext(new BasicHttpContext()); | return new HttpClientContext(new BasicHttpContext()); | |||
} | } | |||
public HttpClientContext(final HttpContext context) { | public HttpClientContext(final HttpContext context) { | |||
super(context); | super(context); | |||
} | } | |||
End of changes. 1 change blocks. | ||||
5 lines changed or deleted | 3 lines changed or added |