8243655: Map.replace javadoc code snippet typo

Replace 'value' with 'oldValue' in Map.replace(K, V, V) javadoc

Reviewed-by: jlaskey, martin, prappo, jboes
This commit is contained in:
Conor Cleary 2020-06-10 09:56:33 +01:00 committed by Julia Boes
parent b4d09cc9e4
commit 0e770d1e3f

View File

@ -829,7 +829,7 @@ public interface Map<K, V> {
* The default implementation is equivalent to, for this {@code map}:
*
* <pre> {@code
* if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
* if (map.containsKey(key) && Objects.equals(map.get(key), oldValue)) {
* map.put(key, newValue);
* return true;
* } else