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

uber / NullAway / #1106
93%

Build:
DEFAULT BRANCH: master
Ran 21 Jun 2023 10:36PM UTC
Jobs 1
Files 80
Run time 2s
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
#1106

push

github-actions

web-flow
Introduce FluentFutureHandler as a workaround for Guava Futures/FluentFuture (#771)

We need this due to our incomplete support for generics, and the fact
that #765 fixes a previous
false negative which would cause our `@NonNull` model for Guava's
`Function` to be ignored
when determining the correct overriding of the functional interface by a
lambda.

After the fix, however, code such as:

```
FluentFuture
            .from(...)
            .transform(s -> { if(...) {...} else { return null; } }, executor);
```

will fail with an error about `Function::apply` having a `@NonNull`
result. Where nullability should
actually depend on the parameter `T` of the `ListenableFuture<T>` in
question.

Unfortunately, usage of this futures API is common internally for us,
and our generics support is far
from fully supporting this in a sound manner, so this diff introduces a
(hopefully temporary) workaround,
in the form of handler for the Futures/FluentFuture Guava APIs:

This works by special casing the return nullability of
`com.google.common.base.Function` and
`com.google.common.util.concurrent.AsyncFunction` to be e.g.
`Function<@Nullable T>` whenever
these functional interfaces are implemented as a lambda expression
passed to a list of specific
methods of `com.google.common.util.concurrent.FluentFuture` or 
`com.google.common.util.concurrent.Futures`. This is unsound, but
permits the code example above to
pass NullAway checking, while strictly reducing the safety hole of
NullAway versions prior to PR #765.

5611 of 6047 relevant lines covered (92.79%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1106.1 21 Jun 2023 10:36PM UTC 0
92.79
Source Files on build #1106
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1106
  • 37f4bb8a 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