BewareMyPower commented on PR #18392:
URL: https://github.com/apache/pulsar/pull/18392#issuecomment-1310219078

   @eolivelli @Demogorgon314 @congbobo184 I chose to revert dc2d9fd since 
implementing `TimedCompletableFuture#completedFuture` doesn't look like so 
trivial.
   
   ```java
       public static <U> CompletableFuture<U> completedFuture(U value) {
           return new CompletableFuture<U>((value == null) ? NIL : value);
       }
   
       CompletableFuture(Object r) { // the constructor is not protected
           RESULT.setRelease(this, r);
       }
   ```
   
   Casting `currentIndividualAckFuture` and `currentCumulativeAckFuture` to 
`TimedCompletableFuture` is safe because they must be `null` or 
`TimedCompletableFuture`.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to