From c5dc4e895f6f2f1d01bea13b48c38df6de2836b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jan 2012 10:21:37 +0100 Subject: [PATCH] diagnostics --- platform/util/src/com/intellij/util/io/PagedFileStorage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/io/PagedFileStorage.java b/platform/util/src/com/intellij/util/io/PagedFileStorage.java index 6a6c14671010..a8acc9b21219 100644 --- a/platform/util/src/com/intellij/util/io/PagedFileStorage.java +++ b/platform/util/src/com/intellij/util/io/PagedFileStorage.java @@ -173,7 +173,9 @@ public class PagedFileStorage implements Forceable { @NotNull private ByteBufferWrapper createValue(Integer key) { checkThreadAccess(); - PagedFileStorage owner = getRegisteredPagedFileStorageByIndex(key & FILE_INDEX_MASK); + final int storageIndex = key & FILE_INDEX_MASK; + PagedFileStorage owner = getRegisteredPagedFileStorageByIndex(storageIndex); + assert owner != null: "No storage for index " + storageIndex; int off = (key & MAX_PAGES_COUNT) * owner.myPageSize; if (off > owner.length()) { throw new IndexOutOfBoundsException("off=" + off + " key.owner.length()=" + owner.length());