Skip to content

Commit d7dcc56

Browse files
Switch to ternary statement
Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: Mason <[email protected]>
1 parent f0e839b commit d7dcc56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/main/java/io/dapr/durabletask/TaskOrchestrationExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,8 @@ private boolean shouldRetry() {
11801180
this.totalRetryTime);
11811181

11821182
// These must default to true if not provided, so it is possible to use only one of them at a time
1183-
boolean shouldRetryBasedOnPolicy = this.policy == null || this.shouldRetryBasedOnPolicy();
1184-
boolean shouldRetryBasedOnHandler = this.handler == null || this.handler.handle(retryContext);
1183+
boolean shouldRetryBasedOnPolicy = this.policy != null ? this.shouldRetryBasedOnPolicy() : true;
1184+
boolean shouldRetryBasedOnHandler = this.handler != null ? this.handler.handle(retryContext) : true;
11851185

11861186
if (this.policy != null) {
11871187
logger.info(() -> String.format("shouldRetryBasedOnPolicy: %s", shouldRetryBasedOnPolicy));

0 commit comments

Comments
 (0)