Skip to content

Commit 54836b5

Browse files
committed
fix: init cached var issue in other workflows
Signed-off-by: “Kevin” <kevlar_ksb@yahoo.com>
1 parent b1f84fe commit 54836b5

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/com/uber/cadence/samples/query/LunchVoteWorkflow.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ public static final class WorkflowImpl implements WorkflowIface {
8585

8686
private final List<LunchOrder> votes = new ArrayList<>();
8787

88-
/** Cached on the workflow thread; queries must not call {@link Workflow#getWorkflowInfo()}. */
8988
private String cachedWorkflowId = "";
90-
9189
private String cachedRunId = "";
9290

9391
@Override

src/main/java/com/uber/cadence/samples/query/OrderFulfillmentWorkflow.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,8 @@ public static final class WorkflowImpl implements WorkflowIface {
107107
*/
108108
private final ArrayDeque<Object> inbox = new ArrayDeque<>();
109109

110-
/** Cached in constructor (workflow thread); queries must not call {@link Workflow#getWorkflowInfo()}. */
111-
private final String cachedWorkflowId;
112-
113-
private final String cachedRunId;
110+
private final String cachedWorkflowId = "";
111+
private final String cachedRunId = "";
114112

115113
/** Inbox wrapper so {@code mark_ready_to_ship} vs {@code mark_delivered} are not ambiguous. */
116114
private static final class ReadyToShipMessage {

0 commit comments

Comments
 (0)