Skip to content

Commit

Permalink
Remove unneccessary 'throws' annotations
Browse files Browse the repository at this point in the history
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 <luke.semerau@gmail.com>
  • Loading branch information
phoenix384 authored and lukeis committed Apr 13, 2016
1 parent 1e39027 commit 40c2033
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public boolean containsWebDriverExtension() {
return extensions.containsKey("webdriver");
}

public void addExtension(Class<?> loadResourcesUsing, String loadFrom) throws IOException {
public void addExtension(Class<?> loadResourcesUsing, String loadFrom) {
// Is loadFrom a file?
File file = new File(loadFrom);
if (file.exists()) {
Expand All @@ -205,9 +205,8 @@ public void addExtension(Class<?> loadResourcesUsing, String loadFrom) throws IO
* Attempt to add an extension to install into this instance.
*
* @param extensionToInstall File pointing to the extension
* @throws IOException IO Exception if can't read the extension to install
*/
public void addExtension(File extensionToInstall) throws IOException {
public void addExtension(File extensionToInstall) {
addExtension(extensionToInstall.getName(), new FileExtension(extensionToInstall));
}

Expand Down

0 comments on commit 40c2033

Please sign in to comment.