File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io/input Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,10 +90,9 @@ public Builder() {
9090 * @see AbstractOrigin#getFile()
9191 * @see #getUnchecked()
9292 */
93- @ SuppressWarnings ("resource" ) // caller closes
9493 @ Override
9594 public RandomAccessFileInputStream get () throws IOException {
96- return new RandomAccessFileInputStream (getRandomAccessFile (), propagateClose );
95+ return new RandomAccessFileInputStream (this );
9796 }
9897
9998 /**
@@ -133,6 +132,11 @@ public static Builder builder() {
133132 private final boolean propagateClose ;
134133 private final RandomAccessFile randomAccessFile ;
135134
135+ @ SuppressWarnings ("resource" ) // caller closes.
136+ private RandomAccessFileInputStream (final Builder builder ) throws IOException {
137+ this (builder .getRandomAccessFile (), builder .propagateClose );
138+ }
139+
136140 /**
137141 * Constructs a new instance configured to leave the underlying file open when this stream is closed.
138142 *
You can’t perform that action at this time.
0 commit comments