diff --git a/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/core/Eth2OutgoingRequestHandler.java b/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/core/Eth2OutgoingRequestHandler.java index 914b015b352..be3e39cd95b 100644 --- a/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/core/Eth2OutgoingRequestHandler.java +++ b/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/core/Eth2OutgoingRequestHandler.java @@ -116,7 +116,7 @@ public void processData(final NodeId nodeId, final RpcStream rpcStream, final By throw new RpcException.ExtraDataAppendedException(" extra data: " + bufToString(data)); } - List maybeResponses = responseDecoder.decodeNextResponses(data); + final List maybeResponses = responseDecoder.decodeNextResponses(data); final int chunksReceived = currentChunkCount.addAndGet(maybeResponses.size()); if (chunksReceived > maximumResponseChunks) { @@ -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()) {