eolivelli commented on a change in pull request #244: Issue#243 - asyncAddEntry fails with NPE with LedgerHandlerAdv URL: https://github.com/apache/bookkeeper/pull/244#discussion_r127581908
########## File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java ########## @@ -165,6 +165,11 @@ public void asyncAddEntry(final long entryId, final byte[] data, final int offse */ @Override protected void doAsyncAddEntry(final PendingAddOp op, final ByteBuf data, final AddCallback cb, final Object ctx) { + if (op.entryId < 0 ) { Review comment: In order to get the npe just see the new testcase. My bad I should have added an example in the issue. The idea is that if in LedgerHandleAdv the user does not provide an entry id, as in the normal addEntry method, the call should be handled as standard LedgerHandle does. I see my fix was too simple. I will come back on it monday. I apologize for having sent a PR too early. ---------------------------------------------------------------- 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