diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FileNameCache.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FileNameCache.java index ab9655a75c03..3f2c4abebf7f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FileNameCache.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FileNameCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,12 +42,12 @@ public class FileNameCache { public static int storeName(@NotNull String name) { final int idx = FSRecords.getNameId(name); - cacheData(name, idx); + cacheData(name, idx, calcStripeIdFromNameId(idx)); return idx; } @NotNull - private static IntObjectLinkedMap.MapEntry cacheData(String name, int id) { + private static IntObjectLinkedMap.MapEntry cacheData(String name, int id, int stripe) { if (name == null) { ourNames.markCorrupted(); throw new RuntimeException("VFS name enumerator corrupted"); @@ -55,7 +55,6 @@ public class FileNameCache { Object rawName = convertToBytesIfAsciiString(name); IntObjectLinkedMap.MapEntry entry = new IntObjectLinkedMap.MapEntry(id, rawName); - final int stripe = calcStripeIdFromNameId(id); synchronized (ourNameCache[stripe]) { return ourNameCache[stripe].cacheEntry(entry); } @@ -99,7 +98,7 @@ public class FileNameCache { } } - return cacheData(FSRecords.getNameByNameId(id), id); + return cacheData(FSRecords.getNameByNameId(id), id, stripe); } @NotNull