Assert that we have a local update

This commit is contained in:
Daniel Lublin
2022-05-16 10:05:15 +02:00
parent 84afc6d934
commit d2728dd29b
3 changed files with 7 additions and 27 deletions

View File

@@ -180,10 +180,15 @@ class MailboxPropertyManagerImpl implements MailboxPropertyManager,
}
@Override
@Nullable
public MailboxPropertiesUpdate getLocalProperties(Transaction txn,
ContactId c) throws DbException {
return getProperties(txn, db.getContact(txn, c), true);
MailboxPropertiesUpdate local =
getProperties(txn, db.getContact(txn, c), true);
// An update (with or without mailbox) is created when contact is added
if (local == null) {
throw new DbException();
}
return local;
}
@Override