``++java.util.concurrent.ScheduledThreadPoolExecutor++``'s pool is sized with ``++corePoolSize++``, so setting ``++corePoolSize++`` to zero means the executor will have no threads and run nothing.


This rule detects instances where ``++corePoolSize++`` is set to zero, via either its setter or the object constructor.


== Noncompliant Code Example

----
public void do(){

  ScheduledThreadPoolExecutor stpe1 = new ScheduledThreadPoolExecutor(0); // Noncompliant

  ScheduledThreadPoolExecutor stpe2 = new ScheduledThreadPoolExecutor(POOL_SIZE);
  stpe2.setCorePoolSize(0);  // Noncompliant
----



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
