changed wording to make clear index/size operations are bad

This commit is contained in:
Alexey Kudravtsev
2017-09-13 13:05:35 +03:00
parent 4be8892a3c
commit da7965e5bc
@@ -303,6 +303,6 @@ public class UnsafeWeakList<T> extends AbstractList<T> {
}
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.");
}
}