2023-05-03 11:06:20 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
2021-09-14 12:31:55 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Noncompliant code example
|
2021-09-14 12:31:55 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,kotlin]
|
2021-09-14 12:31:55 +02:00
|
|
|
----
|
|
|
|
fun do() {
|
|
|
|
|
|
|
|
val stpe1 = ScheduledThreadPoolExecutor(0) // Noncompliant
|
|
|
|
|
|
|
|
val stpe2 = ScheduledThreadPoolExecutor(POOL_SIZE)
|
|
|
|
stpe2.corePoolSize = 0 // Noncompliant
|
|
|
|
|
|
|
|
...
|
|
|
|
----
|