You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing a byte array to DirectBufferOutputStream fails when attempting to make use of the full capacity of the buffer. The reason is a bug in the capacity check in
publicvoidwrite(finalbyte[] srcBytes, finalintsrcOffset, finalintlength)
{
finallongresultingOffset = position + ((long)length);
if (resultingOffset >= this.length)
{
thrownewIllegalStateException("insufficient capacity in the buffer");
}
buffer.putBytes(offset + position, srcBytes, srcOffset, length);
position += length;
}
Writing a byte array to
DirectBufferOutputStream
fails when attempting to make use of the full capacity of the buffer. The reason is a bug in the capacity check inThe second line should be
The following unit test reproduces the problem:
The text was updated successfully, but these errors were encountered: