diff options
Diffstat (limited to 'platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java')
-rw-r--r-- | platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java index ebb7911e82be..6427765295c5 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java @@ -354,7 +354,7 @@ public class MapReduceIndex<Key, Value, Input> implements UpdatableIndex<Key,Val FileContent fileContent = (FileContent)content; hashId = getHashOfContent(fileContent); if (doReadSavedPersistentData) { - if (!myContents.isBusyReading()) { // avoid blocking read, we can calculate index value + if (!myContents.isBusyReading() || DebugAssertions.EXTRA_SANITY_CHECKS) { // avoid blocking read, we can calculate index value ByteSequence bytes = myContents.get(hashId); if (bytes != null) { data = deserializeSavedPersistentData(bytes); @@ -367,7 +367,7 @@ public class MapReduceIndex<Key, Value, Input> implements UpdatableIndex<Key,Val "Unexpected difference in indexing of %s by index %s, file type %s, charset %s\ndiff %s\nprevious indexed info %s", fileContent.getFile(), myIndexId, - fileContent.getFileType(), + fileContent.getFileType().getName(), ((FileContentImpl)fileContent).getCharset(), buildDiff(data, contentData), myIndexingTrace.get(hashId) @@ -396,7 +396,7 @@ public class MapReduceIndex<Key, Value, Input> implements UpdatableIndex<Key,Val FileContent fileContent = (FileContent)content; try { - myIndexingTrace.put(hashId, ((FileContentImpl)fileContent).getCharset() + "," + fileContent.getFileType()+"," + fileContent.getFile().getPath() + "," + + myIndexingTrace.put(hashId, ((FileContentImpl)fileContent).getCharset() + "," + fileContent.getFileType().getName()+"," + fileContent.getFile().getPath() + "," + ExceptionUtil.getThrowableText(new Throwable())); } catch (IOException ex) { LOG.error(ex); |