Closed
Description
Calling ScheduledDataLoaderRegistry.newScheduledRegistry() creates a new ScheduledExecutorService on every call, regardless of whether one is passed to the builder or not.
To reproduce:
ScheduledExecutorService myScheduledExecutor = Executors.newSingleThreadScheduledExecutor();
ScheduledDataLoaderRegistry registry = ScheduledDataLoaderRegistry.newScheduledRegistry().scheduledExecutorService(myScheduledExecutor).build();
This is due to the builder field being initialized with a default; it might be better to initialize the field to null and then only create a new ScheduledExecutorService if a custom one is not passed in.
Metadata
Metadata
Assignees
Labels
No labels