Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. GitHub Wiki
  3. NullAway

NullAway

MITJavav0.14.2

A fast annotation-based null checker for Java that eliminates NullPointerExceptions with low build-time overhead.

GitHubGitHub
4.1k stars372 forks0 contributors

What is NullAway?

NullAway is a static analysis tool for Java that helps developers eliminate NullPointerExceptions (NPEs) by performing compile-time checks based on @Nullable annotations. It identifies potential null dereferences and ensures proper null handling, similar to null-safety features in Kotlin and Swift. The tool integrates with Error Prone and runs during builds with minimal performance impact.

Target Audience

Java developers and teams building large-scale applications who want to improve code reliability by preventing runtime null pointer errors. It's particularly valuable for projects adopting gradual null-safety or migrating from unannotated codebases.

Value Proposition

Developers choose NullAway for its exceptional balance of effectiveness and performance—it catches most production NPEs while adding less than 10% build overhead. Unlike more comprehensive but heavier solutions, it provides practical null-safety with minimal annotation burden and seamless integration into existing Java toolchains.

Overview

A tool to help eliminate NullPointerExceptions (NPEs) in your Java code with low build-time overhead

Use Cases

Best For

  • Gradually adding null-safety to large existing Java codebases
  • Preventing NullPointerExceptions in production Java applications
  • Teams wanting Kotlin-like null safety without switching languages
  • Java projects using Error Prone for static analysis
  • Android development with Java (using AndroidX annotations)
  • Projects needing fast null checking without significant build slowdowns

Not Ideal For

  • Codebases heavily reliant on Lombok for code generation, due to known incompatibilities and required specific configuration
  • Projects requiring exhaustive null-safety guarantees, as NullAway is designed for practical, not comprehensive, NPE prevention
  • Teams using older JDK versions (below 17) or build systems not supported by Error Prone, given its dependencies

Pros & Cons

Pros

Fast Build Integration

Adds typically less than 10% overhead to builds by running as an Error Prone plugin, enabling frequent checks without significant slowdown, as stated in the README.

Flexible Annotation Support

Works with multiple @Nullable annotation libraries like JSpecify, AndroidX, or JetBrains, allowing teams to use their preferred tools without vendor lock-in.

Gradual Adoption Friendly

Supports configurable package scoping to check specific packages, making it easy to incrementally add null-safety to large existing codebases, as highlighted in the features.

Practical NPE Detection

Catches most common NullPointerExceptions observed in production, offering high value with reasonable annotation effort, aligning with its philosophy of practicality.

Cons

Incomplete Null Safety

Does not prevent all possible NPEs, as it focuses on common cases and may miss edge scenarios, unlike more exhaustive tools like the Checker Framework.

Complex Setup for Generated Code

Requires manual configuration to handle code from annotation processors like Dagger, and has issues with Lombok, adding setup complexity and potential build errors.

JDK and Build System Constraints

Mandates JDK 17 or higher and integration with Error Prone, which may not be feasible for legacy projects or those using incompatible build tools.

Frequently Asked Questions

Quick Stats

Stars4,124
Forks372
Contributors0
Open Issues143
Last commit1 day ago
CreatedSince 2017

Tags

#null-safety#static-code-analysis#android#annotation-processing#nullability#java#code-quality#type-checking#static-analysis#build-tool

Built With

J
Java

Included in

GitHub Wiki442
Auto-fetched 1 day ago

Related Projects

guavaguava

Google core libraries for Java

Stars51,916
Forks11,211
Last commit1 day ago
HystrixHystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.

Stars24,480
Forks4,665
Last commit10 months ago
hhvmhhvm

A virtual machine for executing programs written in Hack.

Stars18,668
Forks3,067
Last commit1 day ago
foundationdbfoundationdb

FoundationDB - the open source, distributed, transactional key-value store

Stars16,795
Forks1,587
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub