Mutating the cache while iterating is undefined
This commit is contained in:
parent
01495172d2
commit
59c90496a6
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue