return new StringBuilder();
}
};
private PacketEncoder() {
}
<BUG>public static String encodePacket(final Packet packet) throws IOException {

String type = packet.getType().getValueAsString();
String data = packet.getData();
int capacity = computeCapacity(type, data);
</BUG>
StringBuilder result = getReusableStringBuilder(capacity);

return new StringBuilder();
}
};
private PacketEncoder() {
}
public static ByteBuf encodePacket(final Packet packet) throws IOException {
CompositeByteBuf compositeByteBuf = PooledByteBufAllocator.DEFAULT.compositeBuffer(2);
ByteBuf dataBytes = packet.getData();
boolean hasData = dataBytes != null;
String type = packet.getType().getValueAsString();
int capacity = computeCapacity(type, hasData);
StringBuilder result = getReusableStringBuilder(capacity);
