From 0f869ebb312981a330d196a454cb5ff5323a9aec Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Fri, 11 Apr 2014 19:26:48 +0200 Subject: [PATCH] schedule index rebuild after assertion --- .../lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java | 2 ++ .../src/com/intellij/util/indexing/FileBasedIndexImpl.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java b/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java index cb925816ca58..6cb43283952f 100644 --- a/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java @@ -286,6 +286,8 @@ public class StubIndexImpl extends StubIndex implements ApplicationComponent, Pe else { throw e; } + } catch (AssertionError ae) { + forceRebuild(ae); } return true; diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index 11c31f8b0e6e..d5adc28eadb0 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -910,6 +910,8 @@ public class FileBasedIndexImpl extends FileBasedIndex { else { throw e; } + } catch(AssertionError ae) { + scheduleRebuild(indexId, ae); } return null; } @@ -1247,6 +1249,8 @@ public class FileBasedIndexImpl extends FileBasedIndex { else { throw e; } + } catch (AssertionError ae) { + scheduleRebuild(indexId, ae); } return true; }