Skip to content

Commit 32af3c6

Browse files
committed
javadoc.
1 parent 96abff6 commit 32af3c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mihxil-functional/src/main/java/org/meeuw/functional/ThrowingAutoCloseable.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
import static org.meeuw.functional.Sneaky.sneakyThrow;
44

55
/**
6-
* An extension of {@link AutoCloseable} that can throw exceptions too.
6+
* An extension of {@link AutoCloseable} that has a typed exception.
7+
* {@link #close()} will sneakily throw any exception thrown by {@link #closeThrows()}, which make it handy in try-with-resources.
8+
*
79
* @since 1.8
810
* @param <E> the type of the exception that can be thrown
911
*/
@@ -21,7 +23,7 @@ default void close() {
2123

2224
/**
2325
* Close, while allowing for an exception.
24-
* @throws E if the operation somehow fails, it throws exceptions of this type
26+
* @throws E if the operation somehow fails, it throws {@link Exception exceptions} of this type
2527
*/
2628
void closeThrows() throws E;
2729

0 commit comments

Comments
 (0)