Throw checked exception if concurrent attempts are made to remove a

contact.
This commit is contained in:
akwizgran
2011-11-15 09:51:51 +00:00
parent 6fd8493d3d
commit effa5c9d8e
2 changed files with 21 additions and 3 deletions

View File

@@ -1229,6 +1229,7 @@ DatabaseCleaner.Callback {
if(LOG.isLoggable(Level.FINE)) LOG.fine("Removing contact " + c);
contactLock.writeLock().lock();
try {
if(!containsContact(c)) throw new NoSuchContactException();
messageLock.writeLock().lock();
try {
messageFlagLock.writeLock().lock();