code: private static <T> T reportGet(Object r)
          throws InterruptedException, ExecutionException {
          if (r == null) // by convention below, null means interrupted
              throw new InterruptedException();
          if (r instanceof AltResult) {
              Throwable x, cause;
              if ((x = ((AltResult)r).ex) == null)
                  return null;
              if (x instanceof CancellationException)
                  throw (CancellationException)x;
              if ((x instanceof CompletionException) &&
                  (cause = x.getCause()) != null)
                  x = cause;
              throw new ExecutionException(x);
          }
          @SuppressWarnings("unchecked") T t = (T) r;
          return t;
      }
docs: Reports result using Future.get conventions.