
* Create rule S2122[Kotlin]: "ScheduledThreadPoolExecutor" should not have 0 core threads * Update rules/S2122/description.adoc Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com> Co-authored-by: margarita-nedzelska-sonarsource <70522623+margarita-nedzelska-sonarsource@users.noreply.github.com>
15 lines
255 B
Plaintext
15 lines
255 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
fun do() {
|
|
|
|
val stpe1 = ScheduledThreadPoolExecutor(0) // Noncompliant
|
|
|
|
val stpe2 = ScheduledThreadPoolExecutor(POOL_SIZE)
|
|
stpe2.corePoolSize = 0 // Noncompliant
|
|
|
|
...
|
|
----
|