code: @SuppressWarnings("unchecked")
      private V report(int s) throws ExecutionException {
          Object x = outcome;
          if (s == NORMAL)
              return (V)x;
          if (s >= CANCELLED)
              throw new CancellationException();
          throw new ExecutionException((Throwable)x);
      }
docs: Returns result or throws exception for completed task.
  
  @param s completed state value