Redundant 'requireNotNull' or 'checkNotNull' call
Reports redundant requireNotNull
or checkNotNull
call on non-nullable expressions.
Example:
fun foo(i: Int) {
requireNotNull(i) // This 'i' is always not null, so this 'requireNotNull' call is redundant.
...
}
After the quick-fix is applied:
fun foo(i: Int) {
...
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Kotlin, @snapshot@ |
Last modified: 13 July 2023