Skip to content
Permalink
Browse files
[JENKINS-46383] using getAssignedLabel since .getAssignedLabelString …
…causes issues when using wrong formatted doublequote restriction labels within the WebUI

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

import java.util.logging.Level;

/**
* @author Victor Martinez
*/
@@ -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 adbacb8

Please sign in to comment.