Skip to content

Commit 480c4e2

Browse files
committed
SpotBugs
1 parent 718ceec commit 480c4e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,11 @@ private void loadProgramFailed(final Throwable problem, SettableFuture<CpsThread
912912
/** Report a fatal error in the VM. */
913913
void croak(Throwable t) {
914914
setResult(Result.FAILURE);
915-
if (startNodes == null || startNodes.isEmpty()) {
915+
boolean noStartNodes;
916+
synchronized (this) {
917+
noStartNodes = startNodes == null || startNodes.isEmpty();
918+
}
919+
if (noStartNodes) {
916920
try {
917921
createPlaceholderNodes(t);
918922
} catch (Exception x) {

0 commit comments

Comments
 (0)