Testing against the type allows us to check the applicability of a build step even if a concrete instance doesn't exist.

Turns out this is crucial for the promoted-builds plugin since at the configuration time there might not exist any promotion job.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5600 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-10-29 23:52:29 +00:00
1 parent 03e2437625
commit ce67ddb991
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -456,7 +456,7 @@ public class Functions {
for (Descriptor<T> b : list) {
if (b instanceof BuildStepDescriptor) {
BuildStepDescriptor bsd = (BuildStepDescriptor) b;
if(bsd.isApplicable(project))
if(bsd.isApplicable(project.getClass()))
result.add(b);
} else {
// old plugins built before 1.150 may not implement BuildStepDescriptor