Repository navigation
Home
Vladimir Sitnikov edited this page Sep 5, 2026
·
12 revisions
NullAway is a tool to help eliminate NullPointerExceptions in Java code, built as a plugin to Error Prone so that it runs on every build. The README covers what NullAway is and how to add it to a Gradle build. These pages cover what comes after that first build.
- Installation covers the Gradle setup, the annotations to depend on, and the minimum JDK and Error Prone versions.
- Configuration lists every command-line flag, and shows how to wire NullAway into Maven, Bazel, and other build systems.
-
Suppressing Warnings covers
@SuppressWarnings,castToNonNull, and auto-suppressing the warnings an existing codebase starts with.
-
Supported Annotations lists the
@Nullable,@Initializer,@Contract, and field-contract annotations NullAway reads. - JSpecify Support covers JSpecify annotations, JSpecify mode for generics, and the two optional Error Prone checks NullAway ships.
- Error Messages explains every message NullAway emits, what causes it, and how to fix it.
- Deliberate Unsoundness lists the null dereferences NullAway knowingly does not catch, and why.
-
Maps explains what NullAway concludes from
containsKey,get, andput. -
Stream Handling covers nullness through
filter, and through callbacks injava.util.streamand RxJava.
- How NullAway Works describes the dataflow analysis, the handler mechanism, and the JSpecify implementation.
Getting NullAway running
Writing the annotations
When NullAway reports something
Internals