From c91701c4b72b6d3007787d0ae9034212d13afa8b Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 21 Dec 2023 08:36:37 -0500 Subject: [PATCH] [IO-826] Add runtime exception support to broken streams #530 Javadoc --- .../commons/io/BrokenTestFactories.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/io/BrokenTestFactories.java b/src/test/java/org/apache/commons/io/BrokenTestFactories.java index b51fef01cb9..91ed8522183 100644 --- a/src/test/java/org/apache/commons/io/BrokenTestFactories.java +++ b/src/test/java/org/apache/commons/io/BrokenTestFactories.java @@ -21,29 +21,48 @@ import java.nio.file.FileSystemNotFoundException; import java.util.stream.Stream; +import org.apache.commons.io.input.BrokenInputStream; +import org.apache.commons.io.input.BrokenReader; +import org.apache.commons.io.output.BrokenOutputStream; +import org.apache.commons.io.output.BrokenWriter; + /** - * Factory for parameterized tests of BrokenInputStream, BrokenReader, BrokenOutputStream, and BrokenWriter. + * Factory for parameterized tests of {@link BrokenInputStream}, {@link BrokenReader}, {@link BrokenOutputStream}, and {@link BrokenWriter}. */ public class BrokenTestFactories { + /** + * A custom Error class. + */ public static final class CustomError extends Error { private static final long serialVersionUID = 1L; } + /** + * A custom Exception class. + */ public static final class CustomException extends Exception { private static final long serialVersionUID = 1L; } + /** + * A custom RuntimeException class. + */ public static final class CustomRuntimeException extends RuntimeException { private static final long serialVersionUID = 1L; } + /** + * Creates a stream of all throwable types used in testing broken streams. + * + * @return a stream of all throwable types used in testing broken streams. + */ public static Stream> parameters() { // @formatter:off return Stream.of(