@@ -214,26 +214,25 @@ public AsyncHttpClient(AsyncHttpClientConfig config) {
214
214
215
215
/**
216
216
* Create a new HTTP Asynchronous Client using a {@link AsyncHttpClientConfig} configuration and
217
- * and a {@link AsyncHttpProvider} .
217
+ * and a AsyncHttpProvider class' name .
218
218
*
219
- * @param config a {@link AsyncHttpClientConfig}
220
- * @param httpProvider a {@link AsyncHttpProvider}
219
+ * @param config a {@link AsyncHttpClientConfig}
220
+ * @param providerClass a {@link AsyncHttpProvider}
221
221
*/
222
- public AsyncHttpClient (AsyncHttpProvider httpProvider , AsyncHttpClientConfig config ) {
223
- this .config = config ;
224
- this .httpProvider = httpProvider ;
222
+ public AsyncHttpClient (String providerClass , AsyncHttpClientConfig config ) {
223
+ this (loadProvider (providerClass , config ), new AsyncHttpClientConfig .Builder ().build ());
225
224
}
226
225
227
226
/**
228
227
* Create a new HTTP Asynchronous Client using a {@link AsyncHttpClientConfig} configuration and
229
- * and a AsyncHttpProvider class' name .
228
+ * and a {@link AsyncHttpProvider} .
230
229
*
231
- * @param config a {@link AsyncHttpClientConfig}
232
- * @param providerClass a {@link AsyncHttpProvider}
230
+ * @param config a {@link AsyncHttpClientConfig}
231
+ * @param httpProvider a {@link AsyncHttpProvider}
233
232
*/
234
- public AsyncHttpClient (String providerClass , AsyncHttpClientConfig config ) {
235
- this .config = new AsyncHttpClientConfig . Builder (). build () ;
236
- this .httpProvider = loadProvider ( providerClass , config ) ;
233
+ public AsyncHttpClient (AsyncHttpProvider httpProvider , AsyncHttpClientConfig config ) {
234
+ this .config = config ;
235
+ this .httpProvider = httpProvider ;
237
236
}
238
237
239
238
public class BoundRequestBuilder extends RequestBuilderBase <BoundRequestBuilder > {
@@ -405,7 +404,7 @@ public void run() {
405
404
protected void finalize () throws Throwable {
406
405
try {
407
406
if (!isClosed .get ()) {
408
- logger .debug ("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks" );
407
+ logger .error ("AsyncHttpClient.close() hasn't been invoked, which may produce file descriptor leaks" );
409
408
}
410
409
} finally {
411
410
super .finalize ();
0 commit comments