You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kotlin provides the functions emptyArray, emptyList, emptyMap, emptySequence, and emptySet to improve the readability of instantiating an empty "collection".
Expected Behavior of the rule
The below can also be applied to the other "empty" variations.
Noncompliant Code
val strs = listOf<String>()
Compliant Code
val strs = emptyList<String>()
The text was updated successfully, but these errors were encountered:
Kotlin provides the functions
emptyArray
,emptyList
,emptyMap
,emptySequence
, andemptySet
to improve the readability of instantiating an empty "collection".Expected Behavior of the rule
The below can also be applied to the other "empty" variations.
Noncompliant Code
Compliant Code
The text was updated successfully, but these errors were encountered: