EA-26724 - assert: MessageBusImpl.checkNotDisposed

This commit is contained in:
Alexey Pegov
2011-04-13 19:24:50 +04:00
parent 41003e65c4
commit 7d3a93e6e7
2 changed files with 8 additions and 1 deletions
@@ -96,7 +96,7 @@ public class FileBasedStorage extends XmlElementStorage {
final Listener listener = messageBus.syncPublisher(STORAGE_TOPIC);
virtualFileTracker.addTracker(fileUrl, new VirtualFileAdapter() {
public void contentsChanged(final VirtualFileEvent event) {
listener.storageFileChanged(event, FileBasedStorage.this);
if (!isDisposed()) listener.storageFileChanged(event, FileBasedStorage.this);
}
}, false, this);
}
@@ -75,6 +75,8 @@ public abstract class XmlElementStorage implements StateStorage, Disposable {
myLocalVersionProvider.changeVersion(componentName, System.currentTimeMillis());
}
};
private boolean myDisposed;
protected XmlElementStorage(@Nullable final TrackingPathMacroSubstitutor pathMacroSubstitutor,
@@ -113,6 +115,10 @@ public abstract class XmlElementStorage implements StateStorage, Disposable {
};
}
protected boolean isDisposed() {
return myDisposed;
}
@Nullable
protected abstract Document loadDocument() throws StateStorageException;
@@ -536,6 +542,7 @@ public abstract class XmlElementStorage implements StateStorage, Disposable {
}
public void dispose() {
myDisposed = true;
}
protected static class StorageData {