diff --git a/core/src/main/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskScheduler.java b/core/src/main/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskScheduler.java index fbc64a7377..bd14f61788 100644 --- a/core/src/main/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskScheduler.java +++ b/core/src/main/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskScheduler.java @@ -101,28 +101,29 @@ public class DelegatingSecurityContextTaskScheduler implements TaskScheduler { @Override public ScheduledFuture schedule(Runnable task, Instant startTime) { - return delegate.schedule(wrap(task), startTime); + return this.delegate.schedule(wrap(task), startTime); } @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, Instant startTime, Duration period) { - return delegate.scheduleAtFixedRate(wrap(task), startTime, period); + return this.delegate.scheduleAtFixedRate(wrap(task), startTime, period); } @Override public ScheduledFuture scheduleAtFixedRate(Runnable task, Duration period) { - return delegate.scheduleAtFixedRate(wrap(task), period); + return this.delegate.scheduleAtFixedRate(wrap(task), period); } @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, Instant startTime, Duration delay) { - return delegate.scheduleWithFixedDelay(wrap(task), startTime, delay); + return this.delegate.scheduleWithFixedDelay(wrap(task), startTime, delay); } @Override public ScheduledFuture scheduleWithFixedDelay(Runnable task, Duration delay) { - return delegate.scheduleWithFixedDelay(wrap(task), delay); + return this.delegate.scheduleWithFixedDelay(wrap(task), delay); } + @Override public Clock getClock() { return this.delegate.getClock(); diff --git a/core/src/test/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskSchedulerTests.java b/core/src/test/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskSchedulerTests.java index 5eb8c77220..3d61c7a58b 100644 --- a/core/src/test/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskSchedulerTests.java +++ b/core/src/test/java/org/springframework/security/scheduling/DelegatingSecurityContextTaskSchedulerTests.java @@ -124,7 +124,7 @@ public class DelegatingSecurityContextTaskSchedulerTests { public void scheduleWhenRunnableDateThenDelegates() { Instant date = Instant.now(); this.delegatingSecurityContextTaskScheduler.schedule(this.runnable, date); - verify(this.scheduler).schedule(any(Runnable.class), any(Date.class)); + verify(this.scheduler).schedule(any(Runnable.class), any(Instant.class)); } @Test