Skip to content

Commit 4bd156f

Browse files
author
Ryan
committed
Merge pull request #75 from lesnail/master
JAVA-378 reallocate buffer when changing chunksize of GridFsInputFile
2 parents a31e2e0 + cfcd2bf commit 4bd156f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/com/mongodb/gridfs/GridFSInputFile.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public void setChunkSize(long _chunkSize) {
144144
if (_outputStream != null || _savedChunks)
145145
return;
146146
this._chunkSize = _chunkSize;
147+
this._buffer = new byte[(int) _chunkSize];
147148
}
148149

149150
/**

0 commit comments

Comments
 (0)