use the default HttpClient executor in DependencyDownloader

(HttpClient *really* doesn't want to be used synchronously)

by reusing the HttpClient we still avoid redundant threads, we just can't reuse the thread making the request for handling it
This commit is contained in:
Jason Penilla committed 2023-07-05 23:47:56 -07:00
1 parent f7e59a2196
commit 25b88f3f8b
1 file changed
+1 -4
@@ -67,10 +67,7 @@ public final class DependencyDownloader {
) {
this.logger = logger;
this.cacheDir = cacheDir;
this.client = HttpClient.newBuilder()
// using a cached thread pool (default) is completely redundant with how we use the client
.executor(Runnable::run)
.build();
this.client = HttpClient.newHttpClient();
}
public Set<Path> resolve() {