Skip to content

Conversation

@twerkmeister
Copy link

This pull requests relates to an issue reported 47 weeks ago.
If you change the chunksize of an GridFsInputFile to a size greater than the default you will get an IndexOutOfBounds Exception, because the buffer isn't reallocated to fit the size.

BR lesnail

@nzrgit
Copy link

nzrgit commented May 12, 2012

Hey... thanks for the patch.

Do you think we should also change the setChunkSize method so that it throws and exception if the following is true?

    if (_outputStream != null || _savedChunks)
        return;

nzrgit pushed a commit that referenced this pull request May 12, 2012
JAVA-378 reallocate buffer when changing chunksize of GridFsInputFile
@nzrgit nzrgit merged commit 4bd156f into mongodb:master May 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants