You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Francois-Xavier Bonnet (JIRA)" <ji...@apache.org> on 2013/02/19 16:25:12 UTC
[jira] [Resolved] (HTTPCLIENT-1324)
CachingHttpClientBuilder.build() fails when asynchronousWorkersMax=0
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francois-Xavier Bonnet resolved HTTPCLIENT-1324.
------------------------------------------------
Resolution: Fixed
Fix Version/s: 4.3 Alpha2
Fixed in trunk.
> CachingHttpClientBuilder.build() fails when asynchronousWorkersMax=0
> --------------------------------------------------------------------
>
> Key: HTTPCLIENT-1324
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1324
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: Cache
> Affects Versions: 4.3 Alpha1
> Reporter: Francois-Xavier Bonnet
> Priority: Minor
> Fix For: 4.3 Alpha2
>
>
> The following code throws an Exception:
> CacheConfig cacheConfig = CacheConfig.custom().setAsynchronousWorkersMax(0).build();
> CachingHttpClientBuilder.create().setCacheConfig(cacheConfig).build();
> java.lang.IllegalArgumentException
> at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:826)
> at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:717)
> at org.apache.http.impl.client.cache.AsynchronousValidator.<init>(AsynchronousValidator.java:74)
> at org.apache.http.impl.client.cache.CachingHttpClientBuilder.createAsynchronousRevalidator(CachingHttpClientBuilder.java:106)
> at org.apache.http.impl.client.cache.CachingHttpClientBuilder.decorateMainExec(CachingHttpClientBuilder.java:100)
> at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:528)
> According to the javadoc of method org.apache.http.impl.client.cache.CacheConfig.Builder.setAsynchronousWorkersMax(int) "a value of 0 disables background revalidations"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org