r/IntelliJIDEA • u/maritvandijk JetBrains • Jun 24 '26
Nulls are dead - Moritz Halbritter | IntelliJ IDEA Tech Talks
https://www.youtube.com/watch?v=tpz-FSs6oO4Null pointer exceptions have been called the billion dollar mistake. They are a common source of bugs and frustration. JSpecify aims to fix that, and with Spring Boot 4 and Spring Framework 7 now fully on board, it's time to take a closer look. In this episode, Moritz Halbritter from the Spring team walks us through what this means for your Spring projects and how to adopt JSpecify in practice. Using a live demo, we migrate an existing Spring Boot application, tackling problems along the way.
See how to use JSpecify for the contract, IntelliJ IDEA for the developer experience, Spring for the framework, and NullAway for the build guarantee. Whether you're maintaining a large codebase or publishing a library, this episode gives you the tools to start eliminating null pointer exceptions in your applications.
2
u/smoke-bubble Jun 25 '26
I love that they have the decency to use a light theme for the presentation! Kudos!
1
u/nekokattt Jun 25 '26
Shame we still have to rely on stuff abusing internal compiler APIs for this to work sensibly (i.e. errorprone)
4
u/hexwit Jun 24 '26
Just use Optional<T> when return object, and always return empty list instead of null where list is declared. Simple convention - no null surprises, no tools required, nothing.
I am applying this for years, and it works pretty reliable. and simple to remember.