Inspectopedia 2026.1 Help

Call chain on 'Flow' type can be simplified

Reports two-call chains on the Flow type from kotlinx.coroutines library which are replaceable by a single call.

It can help you to avoid redundant code execution.

The quick-fix replaces the call chain with a single call.

Example:

fun main() { flowOf("1", "2", "Oh").map { it.toIntOrNull() }.filterNotNull() }
fun main() { flowOf("1", "2", "Oh").mapNotNull { it.toIntOrNull() } }

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

SimplifiableFlowCallChain
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Kotlin | Coroutine inspections

Inspection ID: SimplifiableFlowCallChain

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection SimplifiableFlowCallChain

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

IntelliJ IDEA 2026.1, Qodana for JVM 2026.1,

Last modified: 31 March 2026