Fixed ByteStringBuilder.resizeTemp
resizeTemp didn't update _tempCapacity, causing ByteStringBuilder to create a new _temp array on each call of +=.
This commit is contained in:
parent
b9ea457161
commit
1453170c96
1 changed files with 1 additions and 0 deletions
|
|
@ -349,6 +349,7 @@ final class ByteStringBuilder extends Builder[Byte, ByteString] {
|
|||
val newtemp = new Array[Byte](size)
|
||||
if (_tempLength > 0) Array.copy(_temp, 0, newtemp, 0, _tempLength)
|
||||
_temp = newtemp
|
||||
_tempCapacity = _temp.length
|
||||
}
|
||||
|
||||
private def ensureTempSize(size: Int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue