urbanairship / android-library

Urban Airship Android SDK
Other
109 stars 123 forks source link

The UAirship.shared() method should also be marked as @Nullable #182

Closed breakwhile closed 3 years ago

breakwhile commented 3 years ago

image image In the shared() method in UAirship, it is marked by @NonNull. But the waitForTakeOff(long millis) method returned by the shared() method is marked by @Nullable. These two flags conflict. I think the UAirship.shared() method should also be marked as @Nullable

rlepinski commented 3 years ago

shared() will never be null, if you take a look at the code it will wait forever if you pass in 0 until it's ready. However just following the annotations makes it seem like it can be null. We will add an extra null check that throws if null to appease the compiler.

Are you having issues with it?