in src/main/java/com/uber/cadence/common/RetryOptions.java [285:306]
public void validate() {
if (initialInterval == null) {
throw new IllegalStateException("required property initialInterval not set");
}
if (expiration == null && maximumAttempts <= 0) {
throw new IllegalArgumentException(
"both MaximumAttempts and Expiration on retry policy are not set, at least one of them must be set");
}
if (maximumInterval != null && maximumInterval.compareTo(initialInterval) < 0) {
throw new IllegalStateException(
"maximumInterval("
+ maximumInterval
+ ") cannot be smaller than initialInterval("
+ initialInterval);
}
if (backoffCoefficient != 0d && backoffCoefficient < 1.0) {
throw new IllegalArgumentException("coefficient less than 1");
}
if (maximumAttempts != 0 && maximumAttempts < 0) {
throw new IllegalArgumentException("negative maximum attempts");
}
}