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
Since `Mockito.mock` is a Java function it returns a Kotlin platform type. By adding an explicit return type to the wrapper, the kotlin version of `mock` will now return a non-platform type. In this case, we know that `Mockito.mock` doesn't return null so we can safely make the wrapper return a non-null type. We add the `!!` to make it clear to the reader our intent is to strip the platform type at this point, and also make the Kotlin compiler add an explicit null-check "just in case" before returning from the kotlin `mock` method.
0 commit comments