Skip to content

Commit 26e6835

Browse files
zsmooreCopilot
andauthored
Update src/main/java/org/dataloader/strategy/BreadthFirstChainedDispatchStrategy.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 58af742 commit 26e6835

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)