Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Aug 9, 2018
1 parent 8ea9133 commit 20f2e23
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ public void composedAnnotationWithInitialDelayAndFixedRate() {
assertEquals(1, postProcessor.getScheduledTasks().size());

Object target = context.getBean("target");
ScheduledTaskRegistrar registrar = (ScheduledTaskRegistrar) new DirectFieldAccessor(
postProcessor).getPropertyValue("registrar");
ScheduledTaskRegistrar registrar = (ScheduledTaskRegistrar)
new DirectFieldAccessor(postProcessor).getPropertyValue("registrar");
@SuppressWarnings("unchecked")
List<IntervalTask> fixedRateTasks = (List<IntervalTask>) new DirectFieldAccessor(registrar).getPropertyValue(
"fixedRateTasks");
List<IntervalTask> fixedRateTasks = (List<IntervalTask>)
new DirectFieldAccessor(registrar).getPropertyValue("fixedRateTasks");
assertEquals(1, fixedRateTasks.size());
IntervalTask task = fixedRateTasks.get(0);
ScheduledMethodRunnable runnable = (ScheduledMethodRunnable) task.getRunnable();
Expand Down Expand Up @@ -694,8 +694,7 @@ public void fixedRate() {

static class SeveralFixedRatesWithSchedulesContainerAnnotationTestBean {

@Schedules({ @Scheduled(fixedRate = 4000),
@Scheduled(fixedRate = 4000, initialDelay = 2000) })
@Schedules({@Scheduled(fixedRate = 4000), @Scheduled(fixedRate = 4000, initialDelay = 2000)})
public void fixedRate() {
}
}
Expand Down

0 comments on commit 20f2e23

Please sign in to comment.