Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.0.0-alpha02
Theme used: N/A
Devices/Android versions reproduced on: N/A
- Relevant code to trigger the issue. N/A
- A screenrecord or screenshots showing the issue (if UI related). N/A
WorkManager has nullability annotations for input parameters, but not for return types. Consumers, especially those using Kotlin, are more likely to make bad assumptions about whether a return value is null or not, leading to potential crashes.
Example:
```
/**
* Gets a {@link LiveData} of the {@link WorkStatus} for a given work id.
*
* @param id The id of the work
* @return A {@link LiveData} of the {@link WorkStatus} associated with {@code id}
*/
public abstract LiveData<WorkStatus> getStatusById(@NonNull UUID id);
```
If the given id is not found, what is returned? A LiveData that immediately emits a Failure WorkStatus? A null LiveData? Or is an exception thrown?