uber / AutoDispose

Automatic binding+disposal of RxJava streams.
https://uber.github.io/AutoDispose/
Apache License 2.0
3.37k stars 226 forks source link

Update annotated packages for NullAway #448

Closed msridhar closed 3 years ago

msridhar commented 3 years ago

Description: Update NullAway's annotated packages setting to point to the new source package, autodispose2.

It's possible that io.reactivex.rxjava3 should also be treated as an annotated package (if you want to prevent passing of null into Rx APIs), but I'm not sure.

msridhar commented 3 years ago

Nice catch. Yeah we would want to treat RxJava this way too, but I can follow up with that change separately if you want.

If you have time to take a look that would be good. I gave it a quick try but got errors in HalfSerializer:

HalfSerializer.java:82: error: [NullAway] passing @Nullable parameter 'error.terminate()' where @NonNull is required
        subscriber.onError(error.terminate());
                                          ^
HalfSerializer.java:148: error: [NullAway] passing @Nullable parameter 'error.terminate()' where @NonNull is required
        observer.onError(error.terminate());

The code looks safe to me but not sure exactly how you want to suppress these.

ZacSweers commented 3 years ago

yeah we'll need to take a larger pass at re-enabling some parts of it