merlimat closed pull request #1318: MockLedgerHandle duplicates LedgerEntries on read URL: https://github.com/apache/bookkeeper/pull/1318
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockLedgerHandle.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockLedgerHandle.java index 6b4bea4d9..838ed5be9 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockLedgerHandle.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockLedgerHandle.java @@ -108,7 +108,7 @@ public void run() { final Queue<LedgerEntry> seq = new ArrayDeque<LedgerEntry>(); long entryId = firstEntry; while (entryId <= lastEntry && entryId < entries.size()) { - seq.add(new LedgerEntry(entries.get((int) entryId++))); + seq.add(new LedgerEntry(entries.get((int) entryId++).duplicate())); } log.debug("Entries read: {}", seq); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services