Skip to content
Discussion options

You must be logged in to vote

that I simply need to adjust the nullability and there won't be any runtime errors, where the function will be called with null?

That sound right. We have spent quite a bit of effort going over the code base using JSpecify @NullMarked to indicate when a value can be null or not.

Java does not enforce this constraint at runtime but Kotlin does.

So before it was

    public InstrumentationContext<ExecutionResult> beginExecution(InstrumentationExecutionParameters parameters, InstrumentationState state) {

and hence it was not known if the return value or the parameters are null or not so in Kotlin it would need to be

fun beginExecution(parameters : InstrumentationExecutionParameters?, state…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by XiangRongLin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants