code: private <R, U> CompletionStage<U> doApplyToEitherAsync(
              CompletionStage<? extends R> first,
              CompletionStage<? extends R> second,
              Function<? super R, U> fn,
              Executor executor) {
      	CompletableCompletionStage<R> nextStage = newCompletableCompletionStage();
  
          // only the first result is accepted by completion stage,
          // the other one is ignored
          BiConsumer<R, Throwable> action = completeHandler(nextStage);
          first.whenComplete(action);
          second.whenComplete(action);
  
          return nextStage.thenApplyAsync(fn, executor);
      }
docs: This method exists just to reconcile generics when called from {@link #runAfterEitherAsync}
  which has unexpected type of parameter "other". The alternative is to ignore compiler warning.