Skip to content

Commit

Permalink
[JENKINS-15156] AbstractProject.builds accessed by Maven & matrix mod…
Browse files Browse the repository at this point in the history
…ule builds before onLoad or onCreatedFromScratch called.

Seem to need to keep the deprecated no-arg RunMap initializer though it is unclear to me how it could work.
  • Loading branch information
jglick committed Feb 7, 2013
1 parent cb07748 commit 37bf35b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/model/AbstractProject.java
Expand Up @@ -162,7 +162,8 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* {@link Run#getPreviousBuild()}
*/
@Restricted(NoExternalUse.class)
protected transient RunMap<R> builds;
@SuppressWarnings("deprecation") // [JENKINS-15156] builds accessed before onLoad or onCreatedFromScratch called
protected transient RunMap<R> builds = new RunMap<R>();

/**
* The quiet period. Null to delegate to the system default.
Expand Down Expand Up @@ -269,7 +270,6 @@ public synchronized void save() throws IOException {
@Override
public void onCreatedFromScratch() {
super.onCreatedFromScratch();
assert builds == null;
builds = createBuildRunMap();
// solicit initial contributions, especially from TransientProjectActionFactory
updateTransientActions();
Expand Down

0 comments on commit 37bf35b

Please sign in to comment.