Find ScheduledThreadPoolExecutors with no core threads

Proprietary

Marks a core pool size of 0 passed to a ScheduledThreadPoolExecutor constructor, including super(..) and an anonymous subclass, to Executors.newScheduledThreadPool, or to setCorePoolSize on one. A scheduled executor only grows to its core size, and its Javadoc warns that with no core threads it may have no thread to run a task once the task is due. Choosing a size is left to the author. Test sources are not searched.

io.moderne.staticanalysis.FindZeroCorePoolSize
mod run . --recipe=io.moderne.staticanalysis.FindZeroCorePoolSize

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.