/** * Overwritten to change result, if necessary. */ @Override protected boolean doSetResult(Object result, boolean undone) { try { result = func.handleResult(result); return DelegatingTerminableDelegationFuture.super.doSetResult(result, func.isUndone(undone)); } catch(Exception e) { return doSetException(e, func.isUndone(undone)); } }