Skip to content

Commit ce78b3c

Browse files
committed
Remove type cast
Javadoc
1 parent 9489237 commit ce78b3c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/main/java/org/apache/commons/io/IOUtils.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,11 @@ public static void closeQuietly(final Closeable closeable) {
829829
* Equivalent to {@link Closeable#close()}, except any exceptions will be ignored.
830830
* <p>
831831
* This is typically used in finally blocks to ensure that the closeable is closed even if an Exception was thrown before the normal close statement was
832-
* reached. <br>
833-
* <b>It should not be used to replace the close statement(s) which should be present for the non-exceptional case.</b> <br>
832+
* reached.
833+
* </p>
834+
* <p>
835+
* <strong>It should not be used to replace the close statement(s) which should be present for the non-exceptional case.</strong>
836+
* </p>
834837
* It is only intended to simplify tidying up where normal processing has already failed and reporting close failure as well is not necessary or useful.
835838
* <p>
836839
* Example code:
@@ -849,7 +852,8 @@ public static void closeQuietly(final Closeable closeable) {
849852
* }
850853
* </pre>
851854
* <p>
852-
* Closing all streams: <br>
855+
* Closing all streams:
856+
* </p>
853857
*
854858
* <pre>
855859
* try {
@@ -1180,7 +1184,7 @@ public static void closeQuietly(final Writer writer) {
11801184
* @see Throwable#addSuppressed(Throwable)
11811185
*/
11821186
public static <T extends Throwable> T closeQuietlySuppress(final Closeable closeable, final T throwable) {
1183-
closeQuietly(closeable, (Consumer<Exception>) throwable::addSuppressed);
1187+
closeQuietly(closeable, throwable::addSuppressed);
11841188
return throwable;
11851189
}
11861190

0 commit comments

Comments
 (0)