Mutating the cache while iterating is undefined

This commit is contained in:
Jason Tedor 2015-10-09 11:23:12 -04:00
parent 01495172d2
commit 59c90496a6
1 changed files with 5 additions and 2 deletions

View File

@ -434,7 +434,9 @@ public class Cache<K, V> {
}
/**
* An LRU sequencing of the keys in the cache that supports removal.
* An LRU sequencing of the keys in the cache that supports removal. This sequence is not protected from mutations
* to the cache (except for {@link Iterator#remove()}. The result of iteration under any other mutation is
* undefined.
*
* @return an LRU-ordered {@link Iterable} over the keys in the cache
*/
@ -460,7 +462,8 @@ public class Cache<K, V> {
}
/**
* An LRU sequencing of the values in the cache.
* An LRU sequencing of the values in the cache. This sequence is not protected from mutations
* to the cache. The result of iteration under mutation is undefined.
*
* @return an LRU-ordered {@link Iterable} over the values in the cache
*/