Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13304

Implicit cast of source type long to narrower destination type int in org.apache.kafka.common.network.MultiSend.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.8.0
    • None
    • network
    • 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."

      Attachments

        Activity

          People

            Unassigned Unassigned
            thomas.bachmann Thomas Bachmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: