Skip to content
Permalink
Browse files
[JENKINS-43361] Unreproducible NPE.
  • Loading branch information
jglick committed Apr 13, 2017
1 parent 92019ea commit 425be8515cfaabd19de5db6a10c3f82875fd72f9
@@ -694,7 +694,7 @@ public void waitForSuspension() throws InterruptedException, ExecutionException
g.scheduleRun().get();
}

public synchronized FlowHead getFlowHead(int id) {
public synchronized @CheckForNull FlowHead getFlowHead(int id) {
return heads.get(id);
}

@@ -383,7 +383,12 @@ private void scheduleNextRun() {

final List<FlowNode> parents = new ArrayList<FlowNode>();
for (int head : bodyHeads) {
parents.add(flow.getFlowHead(head).get());
FlowHead flowHead = flow.getFlowHead(head);
if (flowHead != null) {
parents.add(flowHead.get());
} else {
LOGGER.log(Level.WARNING, "Could not find flow head #{0}", head);
}
}

flow.runInCpsVmThread(new FutureCallback<CpsThreadGroup>() {

0 comments on commit 425be85

Please sign in to comment.