diff --git a/platform/util/src/com/intellij/util/containers/UnsafeWeakList.java b/platform/util/src/com/intellij/util/containers/UnsafeWeakList.java index 385274ff1b41..0fea8964ba97 100644 --- a/platform/util/src/com/intellij/util/containers/UnsafeWeakList.java +++ b/platform/util/src/com/intellij/util/containers/UnsafeWeakList.java @@ -303,6 +303,6 @@ public class UnsafeWeakList extends AbstractList { } private T throwNotRandomAccess() { - throw new IncorrectOperationException("UnsafeWeakList is not RandomAccess, use list.iterator() instead."); + throw new IncorrectOperationException("index/size-based operations in UnsafeWeakList are not supported because they don't make sense in the presence of weak references. Use list.iterator() (which retains elements to avoid sudden GC) instead."); } }