Skip to content

Commit 67d3dc4

Browse files
committed
Replace Throwables.propagate with equivalent rethrows.
Committed on behalf of the Guava team, who are trying to eliminate Throwables.propagate, especially for trivial throws like this one.
1 parent ae3e1bf commit 67d3dc4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

java/client/test/org/openqa/selenium/testing/drivers/OutOfProcessSeleniumServer.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717

1818
package org.openqa.selenium.testing.drivers;
1919

20-
import com.google.common.base.Throwables;
20+
import static java.util.concurrent.TimeUnit.SECONDS;
2121

2222
import com.google.common.io.Files;
23+
2324
import org.openqa.selenium.Build;
2425
import org.openqa.selenium.Capabilities;
2526
import org.openqa.selenium.net.NetworkUtils;
@@ -38,8 +39,6 @@
3839
import java.util.List;
3940
import java.util.logging.Logger;
4041

41-
import static java.util.concurrent.TimeUnit.SECONDS;
42-
4342
public class OutOfProcessSeleniumServer {
4443

4544
private static final Logger log = Logger.getLogger(OutOfProcessSeleniumServer.class.getName());
@@ -97,9 +96,9 @@ public OutOfProcessSeleniumServer start() {
9796
log.info("Server is ready");
9897
} catch (UrlChecker.TimeoutException e) {
9998
log.severe("Server failed to start: " + e.getMessage());
100-
throw Throwables.propagate(e);
99+
throw new RuntimeException(e);
101100
} catch (MalformedURLException e) {
102-
throw Throwables.propagate(e);
101+
throw new RuntimeException(e);
103102
}
104103

105104
return this;

0 commit comments

Comments
 (0)