Skip to content

Commit 6c7ab00

Browse files
committed
Use the default HttpClient.Factory where possible
1 parent 89870f0 commit 6c7ab00

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

java/server/src/org/openqa/grid/internal/BaseGridRegistry.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import org.openqa.grid.web.Hub;
2121
import org.openqa.selenium.remote.http.HttpClient;
22-
import org.openqa.selenium.remote.internal.OkHttpClient;
2322

2423
import java.net.URL;
2524

@@ -30,7 +29,7 @@ public abstract class BaseGridRegistry implements GridRegistry {
3029
protected volatile Hub hub;
3130

3231
public BaseGridRegistry(Hub hub) {
33-
this.httpClientFactory = new OkHttpClient.Factory();
32+
this.httpClientFactory = HttpClient.Factory.createDefault();
3433
this.hub = hub;
3534
}
3635

java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.openqa.selenium.remote.http.HttpClient;
4040
import org.openqa.selenium.remote.http.HttpRequest;
4141
import org.openqa.selenium.remote.http.HttpResponse;
42-
import org.openqa.selenium.remote.internal.OkHttpClient;
4342
import org.openqa.selenium.remote.server.log.LoggingManager;
4443

4544
import java.net.MalformedURLException;
@@ -65,12 +64,12 @@ public class SelfRegisteringRemote {
6564
private boolean hasId;
6665

6766
public SelfRegisteringRemote(GridNodeConfiguration configuration) {
68-
this(RegistrationRequest.build(configuration));
67+
this(RegistrationRequest.build(configuration, null, null));
6968
}
7069

7170
public SelfRegisteringRemote(RegistrationRequest request) {
7271
this.registrationRequest = request;
73-
this.httpClientFactory = new OkHttpClient.Factory();
72+
this.httpClientFactory = HttpClient.Factory.createDefault();
7473
this.nodeServlets = new HashMap<>();
7574

7675
registrationRequest.validate();

0 commit comments

Comments
 (0)