Skip to content

Commit 64cd3ae

Browse files
committed
[java] Deleting exception declarations that are never thrown
1 parent 5c70fc3 commit 64cd3ae

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

java/client/src/com/thoughtworks/selenium/SeleneseTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected int getDefaultPort() {
131131
* @param port the port that you want to run your tests on
132132
* @throws Exception exception all the things!
133133
*/
134-
public void setUp(String url, String browserString, int port) throws Exception {
134+
public void setUp(String url, String browserString, int port) {
135135
if (url == null) {
136136
url = "http://localhost:" + port;
137137
}

java/client/src/com/thoughtworks/selenium/SeleneseTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void setUp(String url, String browserString) throws Exception {
122122
* @param port the port of Selenium RC
123123
* @throws Exception yep, generic Exception
124124
*/
125-
public void setUp(String url, String browserString, int port) throws Exception {
125+
public void setUp(String url, String browserString, int port) {
126126
stb.setUp(url, browserString, port);
127127
selenium = stb.selenium;
128128
}

java/client/src/org/openqa/selenium/io/CircularOutputStream.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.openqa.selenium.io;
1919

20-
import java.io.IOException;
2120
import java.io.OutputStream;
2221

2322
/**
@@ -39,7 +38,7 @@ public CircularOutputStream() {
3938
}
4039

4140
@Override
42-
public synchronized void write(int b) throws IOException {
41+
public synchronized void write(int b) {
4342
if (end == buffer.length) {
4443
filled = true;
4544
end = 0;

java/client/src/org/openqa/selenium/io/FileHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static InputStream locateResource(Class<?> forClassLoader, String name)
6969
}
7070

7171

72-
public static boolean createDir(File dir) throws IOException {
72+
public static boolean createDir(File dir) {
7373
if ((dir.exists() || dir.mkdirs()) && dir.canWrite())
7474
return true;
7575

@@ -83,7 +83,7 @@ public static boolean createDir(File dir) throws IOException {
8383
return createDir(dir.getParentFile());
8484
}
8585

86-
public static boolean makeWritable(File file) throws IOException {
86+
public static boolean makeWritable(File file) {
8787
return file.canWrite() || file.setWritable(true);
8888
}
8989

java/client/src/org/openqa/selenium/remote/ProtocolHandshake.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public Result createSession(HttpClient client, Command command)
9191
desired));
9292
}
9393

94-
private Optional<Result> createSession(HttpClient client, InputStream newSessionBlob, long size)
95-
throws IOException {
94+
private Optional<Result> createSession(HttpClient client, InputStream newSessionBlob, long size) {
9695
// Create the http request and send it
9796
HttpRequest request = new HttpRequest(HttpMethod.POST, "/session");
9897

0 commit comments

Comments
 (0)