I'm looking at the JDK8 source for uniComposeStage, which is the implementation called for typical usages of thenCompose:
private <V> CompletableFuture<V> uniComposeStage(
Executor e, Function<? super T, ? extends CompletionStage<V>> f) {
if (f == ...