Stop Runtime NPEs: Enforcing Null Safety at the Kotlin-Java Boundary with JSR-305 Strict Mode
Kotlin treats unannotated Java types as platform types, deferring null failures to runtime. Annotate Java APIs and enable -Xjsr305=strict to move enforcement to compile time.