Software Open Access

NullAway: Practical Type-Based Null Safety for Java

Subarno Banerjee; Lazaro Clapp; Manu Sridharan

JSON-LD ( Export

  "inLanguage": {
    "alternateName": "eng", 
    "@type": "Language", 
    "name": "English"
  "description": "<p>NullAway is a tool to help eliminate&nbsp;<code>NullPointerException</code>s (NPEs) in your Java code. To use NullAway, first add&nbsp;<code>@Nullable&nbsp;</code>annotations in your code wherever a field, method parameter, or return value may be&nbsp;<code>null</code>. Given these annotations, NullAway performs a series of type-based, local checks to ensure that any pointer that gets dereferenced in your code cannot be&nbsp;<code>null</code>. NullAway is similar to the type-based nullability checking in the Kotlin and Swift languages, and the&nbsp;<a href=\"\">Checker Framework</a>&nbsp;and&nbsp;<a href=\"\">Eradicate</a>&nbsp;null checkers for Java.</p>\n\n<p>NullAway is&nbsp;<em>fast</em>. It is built as a plugin to&nbsp;<a href=\"\">Error Prone</a>&nbsp;and can run on every single build of your code. In our measurements, the build-time overhead of running NullAway is usually less than 10%. NullAway is also&nbsp;<em>practical</em>: it does not prevent all possible NPEs in your code, but it catches most of the NPEs we have observed in production while imposing a reasonable annotation burden.</p>", 
  "license": "", 
  "creator": [
      "affiliation": "University of Michigan", 
      "@type": "Person", 
      "name": "Subarno Banerjee"
      "affiliation": "Uber Technologies, Inc.", 
      "@type": "Person", 
      "name": "Lazaro Clapp"
      "affiliation": "University of California, Riverside", 
      "@type": "Person", 
      "name": "Manu Sridharan"
  "url": "", 
  "datePublished": "2019-07-01", 
  "version": "0.6.4", 
  "keywords": [
    "static code analysis", 
    "pluggable type systems", 
    "null safety", 
  "@context": "", 
  "identifier": "", 
  "@id": "", 
  "@type": "SoftwareSourceCode", 
  "name": "NullAway: Practical Type-Based Null Safety for Java"
All versions This version
Views 9595
Downloads 88
Data volume 10.0 MB10.0 MB
Unique views 8383
Unique downloads 88


Cite as