check for file validness before acquiring its stampt

This commit is contained in:
Maxim.Mossienko
2016-11-10 16:07:52 +01:00
parent 93e379a413
commit f3465ee484
@@ -1482,7 +1482,7 @@ public class FileBasedIndexImpl extends FileBasedIndex {
try {
// if file was scheduled for update due to vfs events then it is present in myFilesToUpdate
// in this case we consider that current indexing (out of roots backed CacheUpdater) will cover its content
if (content.getTimeStamp() != file.getTimeStamp()) {
if (file.isValid() && content.getTimeStamp() != file.getTimeStamp()) {
content = new com.intellij.ide.caches.FileContent(file);
}
if (!file.isValid() || isTooLarge(file)) {