Skip to content

Commit d8729a7

Browse files
quaffsbrannen
authored andcommitted
Polish variable name in ReschedulingRunnable
As a variable name, `initDelay` is applicable for `scheduleAtFixedRate` and `scheduleWithFixedDelay` but not for `schedule`. Closes gh-30762
1 parent c95426a commit d8729a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-context/src/main/java/org/springframework/scheduling/concurrent/ReschedulingRunnable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public ScheduledFuture<?> schedule() {
7979
if (this.scheduledExecutionTime == null) {
8080
return null;
8181
}
82-
Duration initialDelay = Duration.between(this.triggerContext.getClock().instant(), this.scheduledExecutionTime);
83-
this.currentFuture = this.executor.schedule(this, initialDelay.toNanos(), TimeUnit.NANOSECONDS);
82+
Duration delay = Duration.between(this.triggerContext.getClock().instant(), this.scheduledExecutionTime);
83+
this.currentFuture = this.executor.schedule(this, delay.toNanos(), TimeUnit.NANOSECONDS);
8484
return this;
8585
}
8686
}

0 commit comments

Comments
 (0)