diff --git a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java index 4183d3bc6e465..16fdbf4053d24 100644 --- a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -81,7 +81,7 @@ public class RemoteWebDriver implements WebDriver, JavascriptExecutor, private static final Logger logger = Logger.getLogger(RemoteWebDriver.class.getName()); private Level level = Level.FINE; - private ErrorHandler errorHandler; + private ErrorHandler errorHandler = new ErrorHandler(); private CommandExecutor executor; private Capabilities capabilities; private SessionId sessionId; @@ -102,7 +102,6 @@ protected RemoteWebDriver() { public RemoteWebDriver(CommandExecutor executor, Capabilities desiredCapabilities, Capabilities requiredCapabilities) { - this.errorHandler = new ErrorHandler(); this.executor = executor; init(desiredCapabilities, requiredCapabilities);