• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / NullAway / #893
93%

Build:
DEFAULT BRANCH: master
Ran 26 Jul 2022 04:25PM UTC
Jobs 1
Files 73
Run time 35s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#893

push

github-actions

web-flow
Allow tracking field accesses outside the this instance and static fields. (#625)

We took the decision, back around the origins of NullAway, to not track arbitrary field-dereferences for nullness propagation. Instead, NullAway expects field accesses to be: a) specifically on fields of the current instance object (i.e. `this`), b) on static fields (e.g. constants/enums), or c) made through getters.

This means that, for example, the following code would produce a surprising NullAway error:

```
if (foo.o == null) {
    foo.o = new Object();
}
return foo.o.toString();
```

Assuming field `o` of `Foo` is `@Nullable` and an instance field, the code above will cause NullAway to complain that `foo.o.toString()` might be dereferencing a "nullable" expression `foo.o`, despite the check right before it. This is because NullAway doesn't track any access paths of the form (argument/local)+field, whereas it does track (argument/local)+method call. This is unintuitive.

While getters are good practice in Java, they aren't universal. This is already a problem for JDK11 codebases and only likely to become more obvious when dealing with JDK17 records.

This PR attempts to relax this requirement.

4800 of 5191 relevant lines covered (92.47%)

0.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #893.1 26 Jul 2022 04:25PM UTC 0
92.47
Source Files on build #893
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #893
  • 4cbd7810 on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc