Java & JVMJava & JVM
Conference50min
INTERMEDIATE

Never a Null Moment with JSpecify

This session presents JSpecify, a collaborative initiative to standardize nullness semantics in Java. It introduces clear, consistent annotations like @NullMarked to define default nullness, enabling safer, more precise code without excessive annotations. Attendees will learn how to adopt JSpecify incrementally to achieve reliable null-safety in existing projects.

talk.summaryAiDisclaimer

Hinse ter Schuur
Hinse ter SchuurSDB Java

talkDetail.whenAndWhere

Wednesday, June 17, 14:10-15:00
Room 3
talks.roomOccupancytalks.noOccupancyInfo
talks.description
Since the beginning of Java we're used to dealing with NullPointerExceptions. We tried to prevent `null` references using project conventions and sprinkling (a lot of) annotations throughout our codebases.
But even with all this tedious work we still run into "null moments", unexpected NullPointerExceptions showing up at runtime.

One of the reasons this problem has been hard to solve is that Java never had a standard well-defined way to express nullness. Different annotation libraries and tools exist, with slightly different semantics. As a result, annotations often act more as hints than as guarantees.

JSpecify aims to change this. It's a collaborative effort by major Java ecosystem stakeholders to define clear, consistent nullness semantics. With JSpecify, you can set default nullness per package via the `@NullMarked` annotation, making your intent explicit.
Because of this precision, JSpecify offers a solid foundation to provide null-safety in your libraries and applications.
You don’t need to annotate everything or rewrite existing code to get started. In this session you will learn what makes JSpecify different from other attempts. You'll also discover how you can start applying JSpecify incrementally in your own production code right away.
nullness
jspecify
java
annotations
talks.speakers
Hinse ter Schuur

Hinse ter Schuur

SDB Java

Netherlands

Hinse is a Software Engineer at SDB Java. He has been a professional Java coder for over 20 years. He loves to share his experience by doing pair programming, reviews, writing articles and giving talks.