JanusGraph / JanusGraph/janusgraph
Consider using NullAway to catch NPEs
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Recently-released [NullAway](https://github.com/uber/NullAway) is a "Fast Annotation-Based Null Checking for Java", self-described as:
> NullAway is a tool to help eliminate `NullPointerException`s (NPEs) in your Java code. To use NullAway, first add `@Nullable` annotations in your code wherever a field, method parameter, or return value may be `null`. 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 `null`. NullAway is similar to the type-based nullability checking in the Kotlin and Swift languages, and the Checker Framework and Eradicate null checkers for Java.
>
> NullAway is fast. It is built as a plugin to Error Prone 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 practical: 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, giving a great "bang for your buck." At Uber, we combine NullAway with RAVE to obtain thorough protection against NPEs in our Android apps.
Seems like it might help us discover current (and prevent future) NPEs in the JanusGraph code base; we've had bug reports for NPEs in the past.
Contributor guide
Research direction
No JanusGraph files, tests, or entry points are named. Start by reviewing the Java build configuration and NullAway's Error Prone integration requirements; done means a documented decision and, if adopted, a build that checks the codebase without breaking existing validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100