Crash early when using a null RecipientId.

This commit is contained in:
Greyson Parrelli 2019-09-25 09:51:41 -04:00
parent b3c7c8db5c
commit 5b755b9501

View file

@ -83,6 +83,7 @@ public class Recipient {
*/
@AnyThread
public static @NonNull LiveRecipient live(@NonNull RecipientId id) {
Preconditions.checkNotNull(id, "ID cannot be null.");
return ApplicationDependencies.getRecipientCache().getLive(id);
}
@ -92,6 +93,7 @@ public class Recipient {
*/
@WorkerThread
public static @NonNull Recipient resolved(@NonNull RecipientId id) {
Preconditions.checkNotNull(id, "ID cannot be null.");
return live(id).resolve();
}