mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-26724 - assert: MessageBusImpl.checkNotDisposed
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+7
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user