Kotlin
'map.get()' with not-null assertion operator (!!)
Info
New
Last modified: 03 December 2024 Reports map.get()!!
that can be replaced with map.getValue()
, map.getOrElse()
, and so on.
Example:
fun test(map: Map<Int, String>): String = map.get(0)!!
After the quick-fix is applied:
fun test(map: Map<Int, String>): String = map.getValue(0)
- 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.
MapGetWithNotNullAssertionOperator
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |
Thanks for your feedback!
Was this page helpful?