Skip to content

Commit 25c524a

Browse files
committed
Fix NPE
Signed-off-by: siri-varma <[email protected]>
1 parent 5880cda commit 25c524a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ public RetryPolicy setMaxRetryInterval(@Nullable Duration maxRetryInterval) {
109109
* @return this retry policy object
110110
*/
111111
public RetryPolicy setRetryTimeout(Duration retryTimeout) {
112-
if (retryTimeout != null && retryTimeout.compareTo(this.firstRetryInterval) < 0) {
113-
throw new IllegalArgumentException("The value for retryTimeout must be greater than or equal to the value for firstRetryInterval.");
112+
if (retryTimeout == null || retryTimeout.compareTo(this.firstRetryInterval) < 0) {
113+
throw new IllegalArgumentException("The value for retryTimeout cannot be null and must be greater than or equal to the value for firstRetryInterval.");
114114
}
115115
this.retryTimeout = retryTimeout;
116116
return this;

0 commit comments

Comments
 (0)