mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use new disposable instance in FileBasedIndexDataInitialization#prepareTasks instead of a lambda
GitOrigin-RevId: 6fe856d96e4e4ce11c90b3f03b891f8fecc3fa05
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c58915eca8
commit
7fffa465a2
+7
-1
@@ -111,7 +111,13 @@ final class FileBasedIndexDataInitialization extends IndexDataInitializer<IndexC
|
||||
// 2) we dispose FileBasedIndex before PersistentFS disposing
|
||||
PersistentFSImpl fs = (PersistentFSImpl)ManagingFS.getInstance();
|
||||
FileBasedIndexImpl fileBasedIndex = (FileBasedIndexImpl)FileBasedIndex.getInstance();
|
||||
Disposable disposable = () -> new FileBasedIndexImpl.MyShutDownTask().run();
|
||||
// anonymous class is required to make sure the new instance is created
|
||||
Disposable disposable = new Disposable() {
|
||||
@Override
|
||||
public void dispose() {
|
||||
new FileBasedIndexImpl.MyShutDownTask().run();
|
||||
}
|
||||
};
|
||||
ApplicationManager.getApplication().addApplicationListener(new MyApplicationListener(fileBasedIndex), disposable);
|
||||
Disposer.register(fs, disposable);
|
||||
myFileBasedIndex.setUpShutDownTask();
|
||||
|
||||
Reference in New Issue
Block a user