Skip to content

Commit

Permalink
[java] Deleting exception declarations that are never thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 5, 2019
1 parent 5c70fc3 commit 64cd3ae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected int getDefaultPort() {
* @param port the port that you want to run your tests on
* @throws Exception exception all the things!
*/
public void setUp(String url, String browserString, int port) throws Exception {
public void setUp(String url, String browserString, int port) {
if (url == null) {
url = "http://localhost:" + port;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void setUp(String url, String browserString) throws Exception {
* @param port the port of Selenium RC
* @throws Exception yep, generic Exception
*/
public void setUp(String url, String browserString, int port) throws Exception {
public void setUp(String url, String browserString, int port) {
stb.setUp(url, browserString, port);
selenium = stb.selenium;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.openqa.selenium.io;

import java.io.IOException;
import java.io.OutputStream;

/**
Expand All @@ -39,7 +38,7 @@ public CircularOutputStream() {
}

@Override
public synchronized void write(int b) throws IOException {
public synchronized void write(int b) {
if (end == buffer.length) {
filled = true;
end = 0;
Expand Down
4 changes: 2 additions & 2 deletions java/client/src/org/openqa/selenium/io/FileHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static InputStream locateResource(Class<?> forClassLoader, String name)
}


public static boolean createDir(File dir) throws IOException {
public static boolean createDir(File dir) {
if ((dir.exists() || dir.mkdirs()) && dir.canWrite())
return true;

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

public static boolean makeWritable(File file) throws IOException {
public static boolean makeWritable(File file) {
return file.canWrite() || file.setWritable(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ public Result createSession(HttpClient client, Command command)
desired));
}

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

Expand Down

0 comments on commit 64cd3ae

Please sign in to comment.