BewareMyPower commented on PR #15321:
URL: https://github.com/apache/pulsar/pull/15321#issuecomment-1110893336
BTW, even in client side, all synchronous methods are implemented via
`CompletableFuture#get`. You should modify all these methods. It's better to
add a util method to `org.apache.pulsar.common.util.FutureUtil` to remove
repeated explanation for the JDK bug.
```java
public static <T> T wait(CompletableFuture<T> future)
throws InterruptedException, ExecutionException,
TimeoutException {
// Use CompletableFuture#get(long, TimeUnit) instead of
CompletableFuture#get()
// details see (https://bugs.openjdk.java.net/browse/JDK-8227018).
return future.get(Integer.MAX_VALUE, TimeUnit.MILLISECONDS);
}
```
Regarding to the debate about whether it's worthy, I think you can send an
email to [email protected] so that more people could see it.
--
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]