Skip to content

Commit 4dcaffa

Browse files
committed
cosmetics
1 parent 8d9c7ca commit 4dcaffa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/tascalate/concurrent/Promises.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ private static <T extends C, C> Promise<T> retryImpl(Function<? super RetryConte
963963

964964
@SuppressWarnings("unchecked")
965965
RetryContext<C>[] ctxRef = new RetryContext[] {initialCtx};
966-
DependentPromise<?>[] prevRef = usePrevAsync ? new DependentPromise[1] : null;
966+
DependentPromise<?>[] prevRef = new DependentPromise[1];
967967

968968
return loop(null, v -> null == v || !v.isSuccess() , (Try<T> v) -> {
969969
RetryContext<C> ctx = ctxRef[0];
@@ -995,7 +995,7 @@ private static <T extends C, C> Promise<T> retryImpl(Function<? super RetryConte
995995
}
996996
}, true);
997997

998-
if (null != prevRef) {
998+
if (usePrevAsync) {
999999
prevRef[0] = result;
10001000
}
10011001

0 commit comments

Comments
 (0)