Skip to content

Commit ea0741f

Browse files
committed
set AsyncHttpClient on demand instead of in contructor
1 parent 480bd3f commit ea0741f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.wego.httpcache.services.factories;
22

3-
import com.ning.http.client.AsyncHttpClient;
43
import com.wego.httpcache.services.AsyncHttpCacheService;
54

65
public interface AsyncHttpServiceFactory {
76
AsyncHttpCacheService create(long ttl);
8-
9-
AsyncHttpCacheService create(AsyncHttpClient asyncHttpClient, long ttl);
107
}

src/main/java/com/wego/httpcache/services/impl/AsyncHttpCacheServiceImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public class AsyncHttpCacheServiceImpl implements AsyncHttpCacheService {
2525
@Inject
2626
public AsyncHttpCacheServiceImpl(@Assisted long ttl) {}
2727

28-
@Inject
29-
public AsyncHttpCacheServiceImpl(@Assisted AsyncHttpClient asyncHttpClient, @Assisted long ttl) {
28+
public void setAsyncHttpClient(AsyncHttpClient asyncHttpClient) {
3029
this.asyncHttpClient = asyncHttpClient;
3130
}
3231

0 commit comments

Comments
 (0)