calling updateTransientActions() from the constructor means we end up calling the overrided methods in subtypes before subtype constructor kicks in. Probably not a good idea.

Instead, opted for a post-constructor hook.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34040 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-08-23 18:33:23 +00:00
1 parent a7c9760e82
commit c9ab4c0473
6 files changed
+25 -11

No files matched your search

@@ -198,11 +198,10 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
protected void updateTransientActions() {
super.updateTransientActions();
// Fix for ISSUE-1149
if (modules!=null) {
for (MavenModule module: modules.values()) {
module.updateTransientActions();
}
for (MavenModule module: modules.values()) {
module.updateTransientActions();
}
if(publishers!=null) // this method can be loaded from within the onLoad method, where this might be null
for (BuildStep step : publishers)
transientActions.addAll(step.getProjectActions(this));