@Nonnull /** Get statuses for each branch - note: some statuses may be null, API consumers MUST use {@link #coerceStatusApi(GenericStatus, StatusApiVersion)} on outputs * to safely handle addition of new statuses. */ public static Map<String, GenericStatus> computeBranchStatuses2(@Nonnull WorkflowRun run, @Nonnull ParallelMemoryFlowChunk parallel) { Map<String,MemoryFlowChunk> branches = parallel.getBranches(); List<BlockStartNode> starts = new ArrayList<BlockStartNode>(branches.size()); List<FlowNode> ends = new ArrayList<FlowNode>(branches.size()); // We can optimize this if needed by not fetching the LabelAction below for (MemoryFlowChunk chunk : branches.values()) { starts.add((BlockStartNode)chunk.getFirstNode()); ends.add(chunk.getLastNode()); } return computeBranchStatuses2(run, parallel.getFirstNode(), starts, ends, parallel.getLastNode()); }