Skip to content

Commit e4e8030

Browse files
committed
Use ExecutorService intead of ThreadPoolExecutor in AsyncHttpClient
Changed the setter to use ExecutorService because that's its threadPool member type and Executors.newFixedThreadPool() returns an ExecutorService (this method is referenced from the setThreadPoll() javadoc)
1 parent e83f35d commit e4e8030

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

library/src/main/java/com/loopj/android/http/AsyncHttpClient.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
import java.util.WeakHashMap;
8282
import java.util.concurrent.ExecutorService;
8383
import java.util.concurrent.Executors;
84-
import java.util.concurrent.ThreadPoolExecutor;
8584
import java.util.zip.GZIPInputStream;
8685

8786

@@ -331,10 +330,10 @@ public void setCookieStore(CookieStore cookieStore) {
331330
* Overrides the threadpool implementation used when queuing/pooling requests. By default,
332331
* Executors.newFixedThreadPool() is used.
333332
*
334-
* @param threadPool an instance of {@link ThreadPoolExecutor} to use for queuing/pooling
333+
* @param threadPool an instance of {@link ExecutorService} to use for queuing/pooling
335334
* requests.
336335
*/
337-
public void setThreadPool(ThreadPoolExecutor threadPool) {
336+
public void setThreadPool(ExecutorService threadPool) {
338337
this.threadPool = threadPool;
339338
}
340339

0 commit comments

Comments
 (0)