Question about v26.0 "JSpecify nullability" change #4410
-
Am I understanding the changelog of v.26.0 correctly that I simply need to adjust the nullability and there won't be any runtime errors, where the function will be called with null? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 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 because you could not know if their are nullable or not. Not with JSpecify its and hence is more precisely that is parameters are always non null but the result value is allowed to be nullable |
Beta Was this translation helpful? Give feedback.
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
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