Guide71.1K views1,315 votes0 replies2,811 following
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.