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