Object[] removedObjects = null;
synchronized (lock) {
if (closed)
return;
ReferenceHashSet associatedObjects = (ReferenceHashSet) extensionToObjects.remove(delta.getExtension());
if (associatedObjects == null)
return;
//Copy the objects early so we don't hold the lock too long
removedObjects = associatedObjects.toArray();
}
notify(delta, removedObjects);
}