[java] Deleting catch block for an exception that is neven thrown
import org.openqa.selenium.remote.LocalFileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.function.Supplier;
@@ -58,9 +57,7 @@ public WebDriver get() {
serverUrl = server.getWebDriverUrl();
}
-
- RemoteWebDriver driver = null;
- driver = new RemoteWebDriver(serverUrl, desiredCapabilities);
+ RemoteWebDriver driver = new RemoteWebDriver(serverUrl, desiredCapabilities);
driver.setFileDetector(new LocalFileDetector());
return driver;
}
@@ -69,12 +66,7 @@ private synchronized void startServer() {
if (started) {
return;
}
-
- try {
server.start("standalone");
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
started = true;
}
}
