Skip to content

Commit

Permalink
[JENKINS-46383] using getAssignedLabel since .getAssignedLabelString …
Browse files Browse the repository at this point in the history
…causes issues when using wrong formatted doublequote restriction labels within the WebUI

Change-Id: I7a5703ec2ae3964e946e3cf883bc6531537b08a7
  • Loading branch information
v1v committed Aug 23, 2017
1 parent 0c091b7 commit f2bd2b0
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -4,6 +4,8 @@
import hudson.model.AbstractProject;
import org.jenkins.ci.plugins.jenkinslint.model.AbstractCheck;

import java.util.logging.Level;

/**
* @author Victor Martinez
*/
Expand All @@ -16,7 +18,7 @@ public JobAssignedLabelChecker(boolean enabled) {
}

public boolean executeCheck(Item item) {
return item instanceof AbstractProject && (((AbstractProject) item).getAssignedLabelString() == null ||
((AbstractProject) item).getAssignedLabelString().length() == 0);
return item instanceof AbstractProject && (((AbstractProject) item).getAssignedLabel() == null ||
((AbstractProject) item).getAssignedLabel().getName().length() == 0);
}
}

0 comments on commit f2bd2b0

Please sign in to comment.