This message was deleted.
# general
s
This message was deleted.
f
There's no workaround I could think of... need to do some Kotlin trickery I guess.
Your proposed workaround indeed works, this is because we are not running into the problem I actually care about and that is the shortcomings of
javax.annotation.Nonnull
and the fact that we cannot annotate type parameters with it. In this case we have a possible workaround, still, nothing that would be ever apparent to any user, especially not if the user follows the JavaDoc. However, we are going to run into this issue over and over again simply because it is impossible to properly tell Kotlin from Java what is nullable and what is not.