this.retryPolicy.abortOn(retry.abortOn());
/** * Specifies when retries should be aborted. Any failure that is assignable from the {@code failure} will be result in * retries being aborted. * * @throws NullPointerException if {@code failure} is null */ @SuppressWarnings({ "rawtypes" }) public RetryPolicy<R> abortOn(Class<? extends Throwable> failure) { Assert.notNull(failure, "failure"); return abortOn(Arrays.asList(failure)); }
/** * Specifies when retries should be aborted. Any failure that is assignable from the {@code failures} will be result * in retries being aborted. * * @throws NullPointerException if {@code failures} is null * @throws IllegalArgumentException if failures is empty */ @SuppressWarnings("unchecked") public RetryPolicy<R> abortOn(Class<? extends Throwable>... failures) { Assert.notNull(failures, "failures"); Assert.isTrue(failures.length > 0, "Failures cannot be empty"); return abortOn(Arrays.asList(failures)); }