Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks
Similarly to previous commits, this method was unused, so we're changing its semantics in API version >= 1.4. #KT-22275 In Progress
This commit is contained in:
Vendored
+2
-2
@@ -48,8 +48,8 @@ class A : MutableMap<Any, Any> {
|
||||
}
|
||||
|
||||
override fun getOrDefault(key: Any, defaultValue: Any): Any {
|
||||
// this condition can not be true because of checkParameterIsNotNull checks in the begin of every method, but it's left here
|
||||
// to emphasize that we expect these parameters are not null
|
||||
// this condition can not be true because of checkParameterIsNotNull/checkNotNullParameter checks in the begin of every method,
|
||||
// but it's left here to emphasize that we expect these parameters are not null
|
||||
if (key == null || defaultValue == null) {
|
||||
throw IllegalArgumentException("fail")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user