Skip to content

Commit

Permalink
JENKINS-48197 Do not initialize fields already loaded from configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Heid authored and Daniel Heid committed Nov 23, 2017
1 parent e31d064 commit 7ab664a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Expand Up @@ -51,8 +51,12 @@ public boolean shouldRunOnSlave() {
}

public Object readResolve() {
results = new HashSet<>();
role = Role.BOTH;
if (results == null) {
results = new HashSet<>();
}
if (role == null) {
role = Role.BOTH;
}
return this;
}

Expand Down
Expand Up @@ -27,7 +27,9 @@ public Iterable<BuildStep> getBuildSteps() {

public Object readResolve() {
super.readResolve();
buildSteps = new ArrayList<>();
if (buildSteps == null) {
buildSteps = new ArrayList<>();
}
return this;
}

Expand Down

0 comments on commit 7ab664a

Please sign in to comment.