Skip to content

Commit

Permalink
couple of finals
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 31, 2024
1 parent c3a1334 commit 10e0d7e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void processData(final NodeId nodeId, final RpcStream rpcStream, final By
throw new RpcException.ExtraDataAppendedException(" extra data: " + bufToString(data));
}

List<TResponse> maybeResponses = responseDecoder.decodeNextResponses(data);
final List<TResponse> maybeResponses = responseDecoder.decodeNextResponses(data);
final int chunksReceived = currentChunkCount.addAndGet(maybeResponses.size());

if (chunksReceived > maximumResponseChunks) {
Expand Down Expand Up @@ -161,8 +161,8 @@ private String bufToString(final ByteBuf buf) {
final int contentSize = Integer.min(buf.readableBytes(), 1024);
String bufContent = "";
if (contentSize > 0) {
ByteBuf bufSlice = buf.slice(0, contentSize);
byte[] bytes = new byte[bufSlice.readableBytes()];
final ByteBuf bufSlice = buf.slice(0, contentSize);
final byte[] bytes = new byte[bufSlice.readableBytes()];
bufSlice.getBytes(0, bytes);
bufContent += Bytes.wrap(bytes);
if (contentSize < buf.readableBytes()) {
Expand Down

0 comments on commit 10e0d7e

Please sign in to comment.