Skip to content

Commit

Permalink
Fix deprecated method call
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Sep 1, 2019
1 parent 4acbb66 commit f4f2f29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public String getScmType(@SuppressWarnings("rawtypes") Job job) {
} else {
String simpleName = job.getClass().getSimpleName();
if ("WorkflowJob".equals(simpleName)) {
Jenkins instance = Jenkins.getInstance();
Jenkins instance = Jenkins.getInstanceOrNull();
if (instance != null && instance.getPlugin("workflow-job") != null) {
org.jenkinsci.plugins.workflow.job.WorkflowJob wfj = (org.jenkinsci.plugins.workflow.job.WorkflowJob) job;
Collection<? extends SCM> scms = wfj.getSCMs();
Expand Down

0 comments on commit f4f2f29

Please sign in to comment.