Permalink
Browse files

Retaining backward compatibility since this already went into a release.

  • Loading branch information...
1 parent 08f2804 commit 0f08dc0cb5dd2a87f877a4ad4e07b1d5685c2de4 @kohsuke kohsuke committed Apr 14, 2012
Showing with 16 additions and 2 deletions.
  1. +16 −2 core/src/main/java/hudson/model/TransientBuildActionFactory.java
@@ -5,6 +5,7 @@
import hudson.ExtensionPoint;
import jenkins.model.Jenkins;
import java.util.Collection;
+import java.util.Collections;
/**
* Extension point for inserting transient {@link Action}s into {@link Run}s.
@@ -20,10 +21,23 @@
/**
* Creates actions for the given build.
*
- * @param Build for which the action objects are requested. Never null.
+ * @param target for which the action objects are requested. Never null.
* @return Can be empty but must not be null.
*/
- public abstract Collection<? extends Action> createFor(Run target);
+ public Collection<? extends Action> createFor(Run target) {
+ if (target instanceof AbstractBuild)
+ return createFor((AbstractBuild)target);
+ else
+ return Collections.emptyList();
+ }
+
+ /**
+ * @deprecated as of 1.461
+ * Override and call {@link #createFor(Run)} instead.
+ */
+ public Collection<? extends Action> createFor(AbstractBuild target) {
+ return Collections.emptyList();
+ }
/**
* Returns all the registered {@link TransientBuildActionFactory}s.

0 comments on commit 0f08dc0

Please sign in to comment.