Skip to content

Commit 797761d

Browse files
committed
Merge branch 'zmoore/dispatch-strategy' of github.com:zsmoore/java-dataloader into zmoore/dispatch-strategy
2 parents 6d2db60 + 26e6835 commit 797761d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/dataloader/strategy/BreadthFirstChainedDispatchStrategy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ public Builder(ScheduledExecutorService scheduledExecutorService) {
120120
}
121121

122122
public Builder setFallbackTimeout(Duration fallbackTimeout) {
123+
if (fallbackTimeout == null) {
124+
throw new IllegalArgumentException("fallbackTimeout must not be null");
125+
}
126+
if (fallbackTimeout.isZero() || fallbackTimeout.isNegative()) {
127+
throw new IllegalArgumentException("fallbackTimeout must be a positive duration");
128+
}
123129
this.fallbackTimeout = Assertions.nonNull(fallbackTimeout);
124130
return this;
125131
}

0 commit comments

Comments
 (0)