private static <T>T reportGet(Object r) throws InterruptedException, ExecutionException {
  if (r == null)   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;
}

private static < T > T reportGet ( Object r ) throws InterruptedException , ExecutionException { if ( r == null ) 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 ; }
reports result using future . get conventions .
