Fix buffer size to ensure by xerial · Pull Request #216 · msgpack/msgpack-java

@xerial

@xerial

komamitsu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure(int byteSizeToRead) looks to guarantee to prepare a buffer requested as byteSizeToRead. So readLen should be simply strLen - cursor? If so, maybe we can remove the outer loop.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like so. i'll remove it

@xerial

@xerial

@komamitsu
Fixed to utilize existing buffer rather than ensuring the buffer size for the whole string size.

@komamitsu

komamitsu added a commit that referenced this pull request

Apr 9, 2015
Fix buffer size to ensure