Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-42310] TimerTrigger Lint defect support Maven and Matrix pro…
…jects
  • Loading branch information
v1v committed Feb 25, 2017
1 parent a93a619 commit fc5ecde
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,7 +1,7 @@
package org.jenkins.ci.plugins.jenkinslint.check;

import hudson.model.Item;
import hudson.model.Project;
import hudson.model.AbstractProject;
import hudson.triggers.TimerTrigger;
import org.jenkins.ci.plugins.jenkinslint.model.AbstractCheck;

Expand All @@ -21,8 +21,8 @@ public TimerTriggerChecker() {

public boolean executeCheck(Item item) {
boolean found = false;
if (item instanceof Project && ((Project) item).getTrigger(TimerTrigger.class) != null ) {
String spec = ((Project) item).getTrigger(TimerTrigger.class).getSpec().toLowerCase();
if (item instanceof AbstractProject && ((AbstractProject) item).getTrigger(TimerTrigger.class) != null ) {
String spec = ((AbstractProject) item).getTrigger(TimerTrigger.class).getSpec().toLowerCase();
if (spec.contains("h")) {
String[] myData = spec.split("\n");
for (String line: myData) {
Expand Down

0 comments on commit fc5ecde

Please sign in to comment.