Skip to content

Commit 89870f0

Browse files
committed
ProtocolConverter does not need an HttpClient.Factory as a static field
1 parent ddccdc2 commit 89870f0

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

java/server/src/org/openqa/selenium/remote/server/ProtocolConverter.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,14 @@
2727
import org.openqa.selenium.remote.http.HttpClient;
2828
import org.openqa.selenium.remote.http.HttpRequest;
2929
import org.openqa.selenium.remote.http.HttpResponse;
30-
import org.openqa.selenium.remote.internal.ApacheHttpClient;
3130
import org.openqa.selenium.remote.internal.JsonToWebElementConverter;
32-
import org.openqa.selenium.remote.internal.OkHttpClient;
3331

3432
import java.io.IOException;
3533
import java.net.URL;
3634
import java.util.Map;
3735

3836
class ProtocolConverter implements SessionCodec {
3937

40-
private final static HttpClient.Factory defaultClientFactory;
41-
static {
42-
String defaultFactory = System.getProperty("webdriver.http.factory", "okhttp");
43-
switch (defaultFactory) {
44-
case "okhttp":
45-
defaultClientFactory = new OkHttpClient.Factory();
46-
break;
47-
48-
case "apache":
49-
default:
50-
defaultClientFactory = new ApacheHttpClient.Factory();
51-
break;
52-
}
53-
}
54-
5538
private final static ImmutableSet<String> IGNORED_REQ_HEADERS = ImmutableSet.<String>builder()
5639
.add("connection")
5740
.add("keep-alive")

0 commit comments

Comments
 (0)