Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.8.0
-
None
-
None
Description
During a security review of Kafka I came across this bug https://lgtm.com/projects/g/apache/kafka/rev/78ba492e3e70fd9db61bc82469371d04a8d6b762/files/clients/src/main/java/org/apache/kafka/common/network/MultiSend.java?sort=name&dir=ASC&mode=heatmap#x9c1b5901406741c6:1
@Override74 public long writeTo(GatheringByteChannel channel) throws IOException {75 if (completed())76 throw new KafkaException("This operation cannot be completed on a complete request.");7778 int totalWrittenPerCall = 0;79 boolean sendComplete = false;80 do {81 long written = current.writeTo(channel);82 totalWritten += written;83 totalWrittenPerCall += written;
"Implicit cast of source type long to narrower destination type int."