Skip to content

Commit f58904a

Browse files
authored
Merge pull request #675 from jglick/isComplete
Avoid logging a warning from `isComplete`
2 parents 63bc17e + 61dec20 commit f58904a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,13 @@ public static void maybeAutoPersistNode(@NonNull FlowNode node) {
12711271

12721272
@Override
12731273
public boolean isComplete() {
1274-
return done || super.isComplete();
1274+
if (done) {
1275+
return true;
1276+
} else {
1277+
synchronized (this) {
1278+
return heads != null && super.isComplete();
1279+
}
1280+
}
12751281
}
12761282

12771283
/**

0 commit comments

Comments
 (0)