YutaLin commented on code in PR #19630:
URL: https://github.com/apache/kafka/pull/19630#discussion_r2080663207


##########
core/src/main/java/kafka/server/TierStateMachine.java:
##########
@@ -136,12 +136,13 @@ private OffsetForLeaderEpochResponseData.EpochEndOffset 
fetchEarlierEpochEndOffs
         // Find the end-offset for the epoch earlier to the given epoch from 
the leader
         Map<TopicPartition, 
OffsetForLeaderEpochRequestData.OffsetForLeaderPartition> partitionsWithEpochs 
= new HashMap<>();
         partitionsWithEpochs.put(partition, new 
OffsetForLeaderEpochRequestData.OffsetForLeaderPartition().setPartition(partition.partition()).setCurrentLeaderEpoch(currentLeaderEpoch).setLeaderEpoch(previousEpoch));
-        Option<OffsetForLeaderEpochResponseData.EpochEndOffset> 
maybeEpochEndOffset = 
leader.fetchEpochEndOffsets(CollectionConverters.asScala(partitionsWithEpochs)).get(partition);
-        if (maybeEpochEndOffset.isEmpty()) {
+        Map<TopicPartition, OffsetForLeaderEpochResponseData.EpochEndOffset> 
endOffsets = leader.fetchEpochEndOffsets(partitionsWithEpochs);

Review Comment:
   Hi @chia7712 Is using `var` in java a coding style in Kafka? Should I update 
all the files? When should i use `var`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to