Skip to content

Commit 40c2033

Browse files
phoenix384lukeis
authored andcommitted
Remove unneccessary 'throws' annotations
If you use the addExtension methods you have to handle an IOException although it cannot be thrown. The constructors of FileExtension/ClasspathExtension do not throw IOExceptions. So the 'throws' annotation of the method addExtension is not neccessary. Signed-off-by: Luke Inman-Semerau <[email protected]>
1 parent 1e39027 commit 40c2033

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public boolean containsWebDriverExtension() {
190190
return extensions.containsKey("webdriver");
191191
}
192192

193-
public void addExtension(Class<?> loadResourcesUsing, String loadFrom) throws IOException {
193+
public void addExtension(Class<?> loadResourcesUsing, String loadFrom) {
194194
// Is loadFrom a file?
195195
File file = new File(loadFrom);
196196
if (file.exists()) {
@@ -205,9 +205,8 @@ public void addExtension(Class<?> loadResourcesUsing, String loadFrom) throws IO
205205
* Attempt to add an extension to install into this instance.
206206
*
207207
* @param extensionToInstall File pointing to the extension
208-
* @throws IOException IO Exception if can't read the extension to install
209208
*/
210-
public void addExtension(File extensionToInstall) throws IOException {
209+
public void addExtension(File extensionToInstall) {
211210
addExtension(extensionToInstall.getName(), new FileExtension(extensionToInstall));
212211
}
213212

0 commit comments

Comments
 (0)