Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always call super from WorkflowRun.onLoad #485

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -556,15 +556,14 @@
}

@Override protected void onLoad() {
super.onLoad();
try {
synchronized (getMetadataGuard()) {
if (executionLoaded) {
LOGGER.log(Level.WARNING, "Double onLoad of build "+this);
LOGGER.log(Level.WARNING, "Double onLoad of build " + this, new Throwable());

Check warning on line 563 in src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 563 is not covered by tests
return;
}
boolean needsToPersist = completed == null;
super.onLoad();

if (Boolean.TRUE.equals(completed) && result == null) {
LOGGER.log(Level.FINE, "Completed build with no result set, defaulting to failure for "+this);
setResult(Result.FAILURE);
Expand Down