Inspectopedia Help

Nested conditional expression

Reports ternary conditional expressions that are nested inside other conditional expressions. Such nested conditionals may be very confusing. "Elvis" expressions are counted as conditionals for purpose of this inspection.


return (condition ? "result" : null) ?: "fail"

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Groovy, 233.SNAPSHOT

Last modified: 13 July 2023