package com.sonyericsson.rebuild;

import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.model.Action;
import hudson.model.Run;
import jenkins.model.Jenkins;

import java.util.Collection;

/**
 * Extension point to propagate additional actions to the rebuild.
 */
public abstract class RebuildActionDispatcher implements ExtensionPoint {

    /**
     * @return the actions to include in the rebuild.
     */
    public abstract Collection<Action> getPropagatingActions(Run r);

    /**
     * All registered {@link RebuildActionDispatcher}s.
     * TODO: use ExtensionList.lookup() once the Jenkins dependency is upgraded >= 1.572
     */
    public static ExtensionList<RebuildActionDispatcher> all() {
        Jenkins j = Jenkins.getInstance();
        return j == null ? ExtensionList.create((Jenkins) null, RebuildActionDispatcher.class) : j.getExtensionList(RebuildActionDispatcher.class);
    }
}

@@ -143,38 +143,8 @@
 Run;
-%0Aimport jenkins.model.Jenkins;
 %0A%0Aim
@@ -535,322 +535,110 @@
    *
- TODO: use ExtensionList.lookup() once the Jenkins dependency is upgraded %3E= 1.572%0A     */%0A    public static ExtensionList%3CRebuildActionDispatcher%3E all() %7B%0A        Jenkins j = Jenkins.getInstance();%0A        return j == null ? ExtensionList.create((Jenkins) null, RebuildActionDispatcher.class) : j.getExtensionList
+/%0A    public static ExtensionList%3CRebuildActionDispatcher%3E all() %7B%0A        return ExtensionList.lookup
 (Reb

Fix TODO