ArithmeticException: long overflow on @Scheduled(fixedDelay = Long.MAX_VALUE) #30754
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
Affects: 6.0.10
I was scheduling a task using
@Scheduled(fixedDelay = Long.MAX_VALUE)
in Spring version 6.0.9. The intention was to schedule the task only once. However, after upgrading to version 6.0.10, the application fails to start with the following exception:It seems that the method
ThreadPoolTaskScheduler.scheduleWithFixedDelay()
was changed in commit 3415b04, which is referenced by issue #30666. This change modifies the delay time unit from milliseconds to nanoseconds. I suspect that this alteration may be the cause of the exception.The text was updated successfully, but these errors were encountered: