eolivelli commented on a change in pull request #717: Issue 716: PendingAddOp
accesses a released ByteBuf
URL: https://github.com/apache/bookkeeper/pull/717#discussion_r150377939
##########
File path:
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockBookKeeperTestCase.java
##########
@@ -237,40 +237,38 @@ protected LedgerMetadata getLedgerMetadata(long
ledgerId) {
return mockLedgerMetadataRegistry.get(ledgerId);
}
+ @SuppressWarnings("unchecked")
private void setupReadLedgerMetadata() {
- doAnswer((Answer<Void>) new Answer<Void>() {
- @Override
- @SuppressWarnings("unchecked")
- public Void answer(InvocationOnMock invocation) throws Throwable {
- Object[] args = invocation.getArguments();
- Long ledgerId = (Long) args[0];
+ doAnswer(invocation -> {
+ Object[] args = invocation.getArguments();
+ Long ledgerId = (Long) args[0];
+ executor.submitOrdered(ledgerId, () -> {
Review comment:
I did the same change in BP14 patches in fact
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services