docs: private static Object getFutureValue(ListenableFuture<?> future) {
      Object valueToSet;
      if (future instanceof TrustedFuture) {
        // Break encapsulation for TrustedFuture instances since we know that subclasses cannot
        // override .get() (since it is final) and therefore this is equivalent to calling .get()
        // and unpacking the exceptions like we do below (just much faster because it is a single
        // field read instead of a read, several branches and possibly creating exceptions).
        return ((AbstractFuture<?>) future).value;
      } else {
        // Otherwise calculate valueToSet by calling .get()
        try {
          Object v = getDone(future);
          valueToSet = v == null ? NULL : v;
        } catch (ExecutionException exception) {
          valueToSet = new Failure(exception.getCause());
        } catch (CancellationException cancellation) {
          valueToSet = new Cancellation(false, cancellation);
        } catch (Throwable t) {
          valueToSet = new Failure(t);
        }
      }
      return valueToSet;
    }