Skip to content

Commit a757448

Browse files
committed
Internal refactoring
1 parent ea6d7ca commit a757448

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/main/java/org/apache/commons/io/input/UncheckedFilterReader.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,10 @@ public Builder() {
9191
* @see #getReader()
9292
* @see #getUnchecked()
9393
*/
94-
@SuppressWarnings("resource")
9594
@Override
9695
public UncheckedFilterReader get() {
9796
// This an unchecked class, so this method is as well.
98-
return Uncheck.get(() -> new UncheckedFilterReader(getReader()));
97+
return Uncheck.get(() -> new UncheckedFilterReader(this));
9998
}
10099

101100
}
@@ -112,11 +111,13 @@ public static Builder builder() {
112111
/**
113112
* Constructs a new filtered reader.
114113
*
115-
* @param reader a Reader object providing the underlying stream.
114+
* @param builder a Builder object providing the underlying stream.
115+
* @throws IOException if an I/O error occurs.
116116
* @throws NullPointerException if {@code reader} is {@code null}.
117117
*/
118-
private UncheckedFilterReader(final Reader reader) {
119-
super(reader);
118+
@SuppressWarnings("resource")
119+
private UncheckedFilterReader(final Builder builder) throws IOException {
120+
super(builder.getReader());
120121
}
121122

122123
/**

0 commit comments

Comments
 (0)