Scheduled tasks aren't cancelled on ScheduledTaskRegistrar destruction anymore [SPR-14286] #18858
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
Romain Moreau opened SPR-14286 and commented
With Spring 4.3.0.RC1, when ScheduledTaskRegistrar was destroyed, scheduled futures were cancelled correctly.
Now, with Spring 4.3.0.RC2, when ScheduledTaskRegistrar is destroyed, scheduled tasks aren't cancelled because the scheduledTasks collection used to iterate the tasks to cancel is empty.
Here's below the code for a quick and dirty reproduction case.
To run with Spring 4.3.0.RC1, replace the spring-boot-starter-parent version with 1.4.0.M2.
With Spring 4.3.0.RC1, you'll see in the log "1 scheduled found" as expected.
With Spring 4.3.0.RC2, you'll see in the log "0 scheduled found" (scheduledTasks set is empty).
Affects: 4.3 RC2
Issue Links:
Referenced from: commits 3576ff0
The text was updated successfully, but these errors were encountered: