Pattern: Unnecessary not-null check
Issue: -
Reports unnecessary not-null checks with requireNotNull
or checkNotNull
that can be removed by the user.
Example of incorrect code:
var string = "foo"
println(requireNotNull(string))
Example of correct code:
var string : String? = "foo"
println(requireNotNull(string))