Skip to content
Permalink
Browse files

[JENKINS-42310] CleanupWorkspace Lint defect support Maven and Matrix…

… projects
  • Loading branch information...
v1v committed Feb 24, 2017
1 parent 8aca943 commit eaca2a7b473dc3d59b63496b82655a9fa54d341c
@@ -2,7 +2,7 @@

import hudson.model.Descriptor;
import hudson.model.Item;
import hudson.model.Project;
import hudson.model.AbstractProject;
import jenkins.model.Jenkins;
import org.jenkins.ci.plugins.jenkinslint.model.AbstractCheck;

@@ -19,7 +19,8 @@ public CleanupWorkspaceChecker() {

public boolean executeCheck(Item item) {
if (Jenkins.getInstance().pluginManager.getPlugin("ws-cleanup")!=null) {
return item instanceof Project && ((Project) item).getPublisher(Descriptor.find("hudson.plugins.ws_cleanup.WsCleanup")) == null;
return item instanceof AbstractProject &&
((AbstractProject) item).getPublishersList().get(Descriptor.find("hudson.plugins.ws_cleanup.WsCleanup")) == null;
} else {
return true;
}

0 comments on commit eaca2a7

Please sign in to comment.
You can’t perform that action at this time.