Skip to content
Permalink
Browse files
Merge pull request #119 from jglick/NPE-JENKINS-43361
[JENKINS-43361] Unreproducible NPE
  • Loading branch information
jglick committed Apr 18, 2017
2 parents 92019ea + 425be85 commit c61336f0168335673d9aac2a53a691e093e7bd6e
@@ -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 c61336f

Please sign in to comment.