hello all - I am trying to clean up a Kotlin proje...
# codingconventions
t
hello all - I am trying to clean up a Kotlin project I am working on using Detekt to find potential bugs, and I was wondering if there is a good way to fetch something from a Map which by default returns a nullable value:
Copy code
val map = mapOf(1 to "one")

val one = map[1]!!
The warning I get with the above example is
UnsafeCallOnNullableType
, and I was wondering if there’s a safe way to get a value from a Map