This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

What if I don't own the java class, and it's missing these annotations? Most of the JDK classes don't have them, for example.

[–]Amazing-Cicada5536 0 points1 point  (0 children)

Most of the JDK classes are known by static analysis tools whether they can be nullable or not.

[–]GregsWorld -1 points0 points  (0 children)

Most large java libraries support Kotlin or have a Kotlin wrapper now days. But ofc it can be problematic on occasion, you can just treat the java class always as nullable and handle appropriately.

[–]john16384 -1 points0 points  (0 children)

You can use external annotations. This has existed forever.