File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
driver-core/src/main/com/mongodb/internal/connection Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ private ByteBuf getCurrentByteBuffer() {
176
176
if (currentByteBuffer == null ) {
177
177
currentByteBuffer = getByteBufferAtIndex (curBufferIndex );
178
178
}
179
+
179
180
if (currentByteBuffer .hasRemaining ()) {
180
181
return currentByteBuffer ;
181
182
}
@@ -185,11 +186,6 @@ private ByteBuf getCurrentByteBuffer() {
185
186
return currentByteBuffer ;
186
187
}
187
188
188
- private ByteBuf getNextByteBuffer () {
189
- assertFalse (bufferList .get (curBufferIndex ).hasRemaining ());
190
- return getByteBufferAtIndex (++curBufferIndex );
191
- }
192
-
193
189
private ByteBuf getByteBufferAtIndex (final int index ) {
194
190
if (bufferList .size () < index + 1 ) {
195
191
ByteBuf buffer = bufferProvider .getBuffer (index >= (MAX_SHIFT - INITIAL_SHIFT )
@@ -459,7 +455,7 @@ private int writeOnBuffers(final String str,
459
455
460
456
if (c < 0x80 ) {
461
457
if (remaining == 0 ) {
462
- curBuffer = getNextByteBuffer ();
458
+ curBuffer = getCurrentByteBuffer ();
463
459
curBufferPos = 0 ;
464
460
curBufferLimit = curBuffer .limit ();
465
461
}
You can’t perform that action at this time.
0 commit comments