~/talk

Preventing null pointer exceptions at compile time

Talkat Devoxx US 2017 · 2017-03-21..03-23· [java, typescript]
links:none on file
links:none on file
slides:none on file

Tool demo shows a Nullness Checker from CheckerFramework.org that enforces a nullness type system at compile time, integrating with javac, Eclipse, IntelliJ, and build tools. It finds real bugs (JUnit crashes, field-initialization and new-array例 issues), has uncovered hundreds of bugs in millions of lines, and produces a formal proof that no null pointer exceptions remain once annotations and a few fixes are added. Expect about 1 annotation per 75 LOC in practice and the ability to prove absence of NPEs for annotated code.

AI-written summary · about

  1. 0:00Intro
  2. 1:09Java's type system is too weak
  3. 4:07Specification 1: non-null parameter
  4. 4:18Specification 2: nullable parameter
  5. 10:43Solution: Pluggable Type Checking
  6. 11:48Optional Type Checking
  7. 12:52The Checker Framework
  8. 14:17Benefits of type systems
  9. 16:32Comparison: other nullness tools
  10. 23:00Java 8 extends annotation syntax
  11. 23:57Java 6 & 7 compatibility (or avoid dependency on Checker Framework)
  12. 28:36Lazy initialization and persistence across side effects
  13. 39:49Map key example
  14. 41:48Optional checks
  15. 42:16Cost of software failures
  16. 43:01Example: Regex Checker
  17. 43:18Tips for pluggable type-checking
  18. 46:00Pluggable type-checking improves code
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.