BewareMyPower commented on a change in pull request #10330:
URL: https://github.com/apache/pulsar/pull/10330#discussion_r619252871
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/intercept/ManagedLedgerInterceptor.java
##########
@@ -36,9 +36,8 @@
* Intercept an OpAddEntry and return an OpAddEntry.
* @param op an OpAddEntry to be intercepted.
* @param numberOfMessages
- * @return an OpAddEntry.
*/
- OpAddEntry beforeAddEntry(OpAddEntry op, int numberOfMessages);
+ void beforeAddEntry(OpAddEntry op, int numberOfMessages);
Review comment:
IMO, the initial API design is bad because the returned value is never
used. And the reviewers, including me, all ignored this problem. Also,
@codelipenghui is right, there's no release version that includes this API yet.
But after thinking for a while, I'll take your advice in this PR and change
where this API is used to
```java
op = beforeAddEntry(op, numOfMessages);
```
instead of
```java
beforeAddEntry(op, numOfMessages);
```
Though the assign is somehow useless, it indicated that `op` is changed
during `beforeAddEntry`.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]