@ 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 ) ; }
Returns result or throws exception for completed task .