Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17638 Add support for Java 23
  3. KAFKA-17723

Fix "this-escape" compiler warnings (MultiThreadedEventProcessor and DistributedHerder) for JDK 23

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None

    Description

      > Task :coordinator-common:compileJava FAILED
      /root/kafka/coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/MultiThreadedEventProcessor.java:107: warning: [this-escape] possible 'this' escape before subclass is fully initialized
              this.threads = IntStream.range(0, numThreads).mapToObj(threadId ->
                                                                     ^
      error: warnings found and -Werror specified
       
      > Task :connect:runtime:compileJava
      /root/kafka/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:269: warning: [this-escape] possible 'this' escape before subclass is fully initialized
              this(config, worker, worker.workerId(), kafkaClusterId, statusBackingStore, configBackingStore, null, restUrl, restClient, worker.metrics(),
                  ^
      /root/kafka/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:318: warning: [this-escape] previous possible 'this' escape happens here via invocation
                                    new RebalanceListener(time), time, clientId, logContext);
       

      Attachments

        Issue Links

          Activity

            People

              anshul35 Anshul Goyal
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: