@Extension
public static class JobTriggerListenerImpl extends Listener {
private JobProvider jobProvider = new JobProvider() {
@SuppressWarnings("rawtypes")
public List<Job> getAllJobs() {
<BUG>return Jenkins.getInstance().getAllItems(Job.class);
}</BUG>
};
void setJobProvider(JobProvider jobProvider) {
this.jobProvider = jobProvider;

@Extension
public static class JobTriggerListenerImpl extends Listener {
private JobProvider jobProvider = new JobProvider() {
@SuppressWarnings("rawtypes")
public List<Job> getAllJobs() {
Jenkins instance = Jenkins.getInstance();
return instance != null ? instance.getAllItems(Job.class) : new ArrayList<Job>();
}
};
void setJobProvider(JobProvider jobProvider) {
this.jobProvider = jobProvider;
