Skip to content

Commit cebbf5e

Browse files
alb-i986kcooney
authored andcommitted
ExternalResource: declare after() to throw Throwable (#1421)
This allows clients to call methods that throw checked exceptions without having to catch and wrap checked exceptions.
1 parent 6d140c7 commit cebbf5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/junit/rules/ExternalResource.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ protected void before() throws Throwable {
7777

7878
/**
7979
* Override to tear down your specific external resource.
80+
*
81+
* @throws Throwable if teardown fails
8082
*/
81-
protected void after() {
83+
protected void after() throws Throwable {
8284
// do nothing
8385
}
8486
}

0 commit comments

Comments
 (0)