File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
mihxil-functional/src/main/java/org/meeuw/functional Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 33import 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
You can’t perform that action at this time.
0 commit comments