This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 04ea25b3c39 MINOR: Replace lambda expressions with method references
in ProducerStateManager (#18753)
04ea25b3c39 is described below
commit 04ea25b3c39252e46334520879ce98ea72df1f93
Author: Logan Zhu <[email protected]>
AuthorDate: Mon Feb 3 10:16:22 2025 +0800
MINOR: Replace lambda expressions with method references in
ProducerStateManager (#18753)
Reviewers: TengYao Chi <[email protected]>, Divij Vaidya
<[email protected]>, Chia-Ping Tsai <[email protected]>
---
.../apache/kafka/storage/internals/log/ProducerStateManager.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java
b/storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java
index 4b0175f3b24..56bf3f0f81c 100644
---
a/storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java
+++
b/storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java
@@ -567,15 +567,15 @@ public class ProducerStateManager {
}
public Optional<File> fetchSnapshot(long offset) {
- return Optional.ofNullable(snapshots.get(offset)).map(x -> x.file());
+ return
Optional.ofNullable(snapshots.get(offset)).map(SnapshotFile::file);
}
private Optional<SnapshotFile> oldestSnapshotFile() {
- return Optional.ofNullable(snapshots.firstEntry()).map(x ->
x.getValue());
+ return
Optional.ofNullable(snapshots.firstEntry()).map(Map.Entry::getValue);
}
private Optional<SnapshotFile> latestSnapshotFile() {
- return Optional.ofNullable(snapshots.lastEntry()).map(e ->
e.getValue());
+ return
Optional.ofNullable(snapshots.lastEntry()).map(Map.Entry::getValue);
}
/**