Skip to content

Commit

Permalink
[JENKINS-38887] Fix findbugs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Mar 6, 2017
1 parent f02e64e commit 042679c
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -124,13 +124,10 @@ protected Job asJob() {
if (quietPeriod == null) {
quietPeriod = Jenkins.getActiveInstance().getQuietPeriod();
}
ScheduleResult scheduleResult = Jenkins.getInstance().getQueue().schedule2(task, quietPeriod, actions);
if (scheduleResult.isRefused()) {
ScheduleResult scheduleResult = Jenkins.getActiveInstance().getQueue().schedule2(task, quietPeriod, actions);
if (scheduleResult.isRefused() || scheduleResult.getItem() == null) {
throw new AbortException("Failed to trigger build of " + item.getFullName());
}
QueueTaskFuture<?> f =
scheduleResult.getItem().getFuture();

} else {
throw new AbortException("The item named " + job + " is a "
+ (item instanceof Describable
Expand Down

0 comments on commit 042679c

Please sign in to comment.