From 31375c4d81f2b5a36317ae5a9e2f432eddc07bd3 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Wed, 10 Apr 2013 21:43:41 +0200 Subject: [PATCH] rewriteIndexVersion atomically (followup for http://crucible.labs.intellij.net/cru/CR-IC-573) --- .../src/com/intellij/util/indexing/IndexInfrastructure.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/IndexInfrastructure.java b/platform/lang-impl/src/com/intellij/util/indexing/IndexInfrastructure.java index 091ba9aace5a..b5d6af84ec88 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/IndexInfrastructure.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/IndexInfrastructure.java @@ -70,7 +70,7 @@ public class IndexInfrastructure { private static volatile long ourLastStamp; // ensure any file index stamp increases - public static void rewriteVersion(final File file, final int version) throws IOException { + public static synchronized void rewriteVersion(final File file, final int version) throws IOException { final long prevLastModifiedValue = file.lastModified(); if (file.exists()) { FileUtil.delete(file);