Skip to content

Commit

Permalink
ExternalResource: declare after() to throw Throwable (junit-team#1421)
Browse files Browse the repository at this point in the history
This allows clients to call methods that throw checked exceptions without having to catch and wrap checked exceptions.
  • Loading branch information
alb-i986 authored and kcooney committed Feb 27, 2017
1 parent df3d0df commit b743729
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/junit/rules/ExternalResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ protected void before() throws Throwable {

/**
* Override to tear down your specific external resource.
*
* @throws Throwable if teardown fails
*/
protected void after() {
protected void after() throws Throwable {
// do nothing
}
}

0 comments on commit b743729

Please sign in to comment.