From 89870f01a1a18790df58c53a7a1abf720e64e958 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Tue, 6 Mar 2018 11:42:50 +0000 Subject: [PATCH] ProtocolConverter does not need an HttpClient.Factory as a static field --- .../remote/server/ProtocolConverter.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/java/server/src/org/openqa/selenium/remote/server/ProtocolConverter.java b/java/server/src/org/openqa/selenium/remote/server/ProtocolConverter.java index a2d6f427270bc..0be6742ef54b2 100644 --- a/java/server/src/org/openqa/selenium/remote/server/ProtocolConverter.java +++ b/java/server/src/org/openqa/selenium/remote/server/ProtocolConverter.java @@ -27,9 +27,7 @@ import org.openqa.selenium.remote.http.HttpClient; import org.openqa.selenium.remote.http.HttpRequest; import org.openqa.selenium.remote.http.HttpResponse; -import org.openqa.selenium.remote.internal.ApacheHttpClient; import org.openqa.selenium.remote.internal.JsonToWebElementConverter; -import org.openqa.selenium.remote.internal.OkHttpClient; import java.io.IOException; import java.net.URL; @@ -37,21 +35,6 @@ class ProtocolConverter implements SessionCodec { - private final static HttpClient.Factory defaultClientFactory; - static { - String defaultFactory = System.getProperty("webdriver.http.factory", "okhttp"); - switch (defaultFactory) { - case "okhttp": - defaultClientFactory = new OkHttpClient.Factory(); - break; - - case "apache": - default: - defaultClientFactory = new ApacheHttpClient.Factory(); - break; - } - } - private final static ImmutableSet IGNORED_REQ_HEADERS = ImmutableSet.builder() .add("connection") .add("keep-alive")