Skip to content

Commit c91701c

Browse files
committed
[IO-826] Add runtime exception support to broken streams #530
Javadoc
1 parent 79ab99b commit c91701c

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/test/java/org/apache/commons/io/BrokenTestFactories.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,48 @@
2121
import java.nio.file.FileSystemNotFoundException;
2222
import java.util.stream.Stream;
2323

24+
import org.apache.commons.io.input.BrokenInputStream;
25+
import org.apache.commons.io.input.BrokenReader;
26+
import org.apache.commons.io.output.BrokenOutputStream;
27+
import org.apache.commons.io.output.BrokenWriter;
28+
2429
/**
25-
* Factory for parameterized tests of BrokenInputStream, BrokenReader, BrokenOutputStream, and BrokenWriter.
30+
* Factory for parameterized tests of {@link BrokenInputStream}, {@link BrokenReader}, {@link BrokenOutputStream}, and {@link BrokenWriter}.
2631
*/
2732
public class BrokenTestFactories {
2833

34+
/**
35+
* A custom Error class.
36+
*/
2937
public static final class CustomError extends Error {
3038

3139
private static final long serialVersionUID = 1L;
3240

3341
}
3442

43+
/**
44+
* A custom Exception class.
45+
*/
3546
public static final class CustomException extends Exception {
3647

3748
private static final long serialVersionUID = 1L;
3849

3950
}
4051

52+
/**
53+
* A custom RuntimeException class.
54+
*/
4155
public static final class CustomRuntimeException extends RuntimeException {
4256

4357
private static final long serialVersionUID = 1L;
4458

4559
}
4660

61+
/**
62+
* Creates a stream of all throwable types used in testing broken streams.
63+
*
64+
* @return a stream of all throwable types used in testing broken streams.
65+
*/
4766
public static Stream<Class<? extends Throwable>> parameters() {
4867
// @formatter:off
4968
return Stream.of(

0 commit comments

Comments
 (0)