[
https://issues.apache.org/jira/browse/KAFKA-17722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941397#comment-17941397
]
Chia-Ping Tsai commented on KAFKA-17722:
----------------------------------------
backport to 3.9
(https://github.com/apache/kafka/commit/fe5802b304b83158f1189f87c87dc79b00df0741)
> Fix "this-escape" compiler warnings (BrokerTopicMetrics) for JDK 23
> -------------------------------------------------------------------
>
> Key: KAFKA-17722
> URL: https://issues.apache.org/jira/browse/KAFKA-17722
> Project: Kafka
> Issue Type: Sub-task
> Reporter: Chia-Ping Tsai
> Assignee: Cheng-Yan Wang
> Priority: Minor
> Fix For: 4.0.0, 3.9.1
>
>
> {code:java}
> > Task :storage:compileJava FAILED
> /root/kafka/storage/src/main/java/org/apache/kafka/storage/log/metrics/BrokerTopicMetrics.java:62:
> warning: [this-escape] possible 'this' escape before subclass is fully
> initialized
> this(Optional.empty(), remoteStorageEnabled);
> ^
> /root/kafka/storage/src/main/java/org/apache/kafka/storage/log/metrics/BrokerTopicMetrics.java:106:
> warning: [this-escape] previous possible 'this' escape happens here via
> invocation
>
> metricGaugeTypeMap.put(RemoteStorageMetrics.REMOTE_COPY_LAG_BYTES_METRIC.getName(),
> new
> GaugeWrapper(RemoteStorageMetrics.REMOTE_COPY_LAG_BYTES_METRIC.getName()));
>
> ^
> /root/kafka/storage/src/main/java/org/apache/kafka/storage/log/metrics/BrokerTopicMetrics.java:66:
> warning: [this-escape] possible 'this' escape before subclass is fully
> initialized
> this(Optional.of(name), remoteStorageEnabled);
> ^
> /root/kafka/storage/src/main/java/org/apache/kafka/storage/log/metrics/BrokerTopicMetrics.java:106:
> warning: [this-escape] previous possible 'this' escape happens here via
> invocation
>
> metricGaugeTypeMap.put(RemoteStorageMetrics.REMOTE_COPY_LAG_BYTES_METRIC.getName(),
> new
> GaugeWrapper(RemoteStorageMetrics.REMOTE_COPY_LAG_BYTES_METRIC.getName()));
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)