Skip to content

Commit 259faf0

Browse files
committed
Clean up imports in RepeatableWorkflowThread
Use imported class names instead of fully qualified names for CompletablePromise, Promise, and Workflow classes.
1 parent 8a5f76f commit 259faf0

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

temporal-sdk/src/main/java/io/temporal/internal/sync/RepeatableWorkflowThread.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
package io.temporal.internal.sync;
22

3+
import static com.google.common.base.Preconditions.checkNotNull;
4+
35
import io.temporal.common.context.ContextPropagator;
6+
import io.temporal.failure.CanceledFailure;
7+
import io.temporal.internal.common.NonIdempotentHandle;
48
import io.temporal.internal.worker.WorkflowExecutorCache;
9+
import io.temporal.workflow.CompletablePromise;
10+
import io.temporal.workflow.Promise;
11+
import io.temporal.workflow.Workflow;
512
import java.util.HashMap;
613
import java.util.List;
714
import java.util.Map;
815
import java.util.Optional;
16+
import java.util.concurrent.CompletableFuture;
917
import java.util.concurrent.Future;
1018
import java.util.function.Supplier;
1119
import javax.annotation.Nonnull;
@@ -62,7 +70,7 @@ class RepeatableWorkflowThread implements WorkflowThread {
6270
private int evaluationCount = 0;
6371

6472
/** Cached cancellation promise, following the pattern from CancellationScopeImpl. */
65-
private io.temporal.workflow.CompletablePromise<String> cancellationPromise;
73+
private CompletablePromise<String> cancellationPromise;
6674

6775
private final WorkflowThreadExecutor workflowThreadExecutor;
6876
private final SyncWorkflowContext syncWorkflowContext;
@@ -243,12 +251,12 @@ public String getCancellationReason() {
243251
}
244252

245253
@Override
246-
public io.temporal.workflow.Promise<String> getCancellationRequest() {
254+
public Promise<String> getCancellationRequest() {
247255
if (currentEvaluationThread != null) {
248256
return currentEvaluationThread.getCancellationRequest();
249257
}
250258
if (cancellationPromise == null) {
251-
cancellationPromise = io.temporal.workflow.Workflow.newPromise();
259+
cancellationPromise = Workflow.newPromise();
252260
if (isCancelled()) {
253261
cancellationPromise.complete(getEffectiveCancellationReason());
254262
}

0 commit comments

Comments
 (0)