code: public static <U> CompletableFuture<U> failedFuture(Throwable ex) {
          if (ex == null) throw new NullPointerException();
          return new CompletableFuture<U>(new AltResult(ex));
      }
docs: Android-changed: hidden