File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/java/org/apache/commons/io/output Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 2222import java .io .OutputStream ;
2323import java .io .RandomAccessFile ;
2424import java .nio .file .StandardOpenOption ;
25- import java .util .Objects ;
2625
2726import org .apache .commons .io .build .AbstractOrigin ;
2827import org .apache .commons .io .build .AbstractStreamBuilder ;
@@ -85,10 +84,9 @@ private Builder() {
8584 * @see AbstractOrigin#getFile()
8685 * @see #getUnchecked()
8786 */
88- @ SuppressWarnings ("resource" ) // caller closes
8987 @ Override
9088 public RandomAccessFileOutputStream get () throws IOException {
91- return new RandomAccessFileOutputStream (getRandomAccessFile () );
89+ return new RandomAccessFileOutputStream (this );
9290 }
9391
9492 }
@@ -104,8 +102,8 @@ public static Builder builder() {
104102
105103 private final RandomAccessFile randomAccessFile ;
106104
107- private RandomAccessFileOutputStream (final RandomAccessFile randomAccessFile ) {
108- this .randomAccessFile = Objects . requireNonNull ( randomAccessFile );
105+ private RandomAccessFileOutputStream (final Builder builder ) throws IOException {
106+ this .randomAccessFile = builder . getRandomAccessFile ( );
109107 }
110108
111109 @ Override
You can’t perform that action at this time.
0 commit comments