hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francois-Xavier Bonnet (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1324) CachingHttpClientBuilder.build() fails when asynchronousWorkersMax=0
Date Tue, 19 Feb 2013 14:45:13 GMT
Francois-Xavier Bonnet created HTTPCLIENT-1324:
--------------------------------------------------

             Summary: 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


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


Mime
View raw message