Sets the failed result of this Future unless this Future has already been cancelled or set (including plain #setFuture set asynchronously). When a call to this method returns, the Future is guaranteed to be plain #isDone done only if the call was accepted
(Throwable throwable)
| 655 | */ |
| 656 | |
| 657 | @CanIgnoreReturnValue |
| 658 | protected boolean setException(Throwable throwable) { |
| 659 | Object valueToSet = new Failure(checkNotNull(throwable)); |
| 660 | if (ATOMIC_HELPER.casValue(this, null, valueToSet)) { |
| 661 | complete(); |
| 662 | return true; |
| 663 | } |
| 664 | return false; |
| 665 | } |
| 666 | |
| 667 | /** |
| 668 | * Sets the result of this {@code Future} to match the supplied input {@code Future} once the |
no test coverage detected