Skip to content
Permalink
Browse files

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

…jects
  • Loading branch information...
v1v committed Feb 25, 2017
1 parent a93a619 commit fc5ecdea507752b7fb2f8b6518905079ec4136fb
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/jenkins/ci/plugins/jenkinslint/check/TimerTriggerChecker.java
@@ -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;

@@ -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) {

0 comments on commit fc5ecde

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