fix(Cache): ignore IllegalStateException ProjectImpl.getEarlyDisposable must not return null

This commit is contained in:
林万程
2024-01-21 16:18:47 +08:00
parent 3e34fa8ac9
commit c08d2d9d5b
2 changed files with 6 additions and 0 deletions

View File

@@ -132,6 +132,9 @@ public class LineEndCacheUtils {
}
}).inSmartMode(project).executeSynchronously();
}));
} catch (IllegalStateException ignore) {
// ignore inSmartMode(project) throw:
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
} catch (Exception e) {
LOG.info("LineEndCacheUtils cache.forEach catch Throwable but log to record.", e);
}

View File

@@ -84,6 +84,9 @@ public class TreeCacheUtils {
}).inSmartMode(project).executeSynchronously();
}
});
} catch (IllegalStateException ignore) {
// ignore inSmartMode(project) throw:
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
} catch (Exception e) {
LOG.info("TreeCacheUtils cache.forEach catch Throwable but log to record.", e);
}