Software Open Access

NullAway: Practical Type-Based Null Safety for Java

Subarno Banerjee; Lazaro Clapp; Manu Sridharan


Citation Style Language JSON Export

{
  "publisher": "Zenodo", 
  "DOI": "10.5281/zenodo.3267950", 
  "language": "eng", 
  "title": "NullAway: Practical Type-Based Null Safety for Java", 
  "issued": {
    "date-parts": [
      [
        2019, 
        7, 
        1
      ]
    ]
  }, 
  "abstract": "<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=\"https://checkerframework.org/\">Checker Framework</a>&nbsp;and&nbsp;<a href=\"http://fbinfer.com/docs/eradicate.html\">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=\"http://errorprone.info/\">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>", 
  "author": [
    {
      "family": "Subarno Banerjee"
    }, 
    {
      "family": "Lazaro Clapp"
    }, 
    {
      "family": "Manu Sridharan"
    }
  ], 
  "version": "0.6.4", 
  "type": "article", 
  "id": "3267950"
}
43
4
views
downloads
All versions This version
Views 4343
Downloads 44
Data volume 5.0 MB5.0 MB
Unique views 3131
Unique downloads 44

Share

Cite as