changeset 59703:787f7a697d6f

8243655: Map.replace javadoc code snippet typo Summary: Replace 'value' with 'oldValue' in Map.replace(K, V, V) javadoc Reviewed-by: jlaskey, martin, prappo, jboes Contributed-by: Conor Cleary <conor.cleary@oracle.com>
author jboes
date Wed, 10 Jun 2020 09:56:33 +0100
parents 485dd761a4ef
children b81dc9abd683
files src/java.base/share/classes/java/util/Map.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/Map.java	Wed Jun 10 09:00:59 2020 +0200
+++ b/src/java.base/share/classes/java/util/Map.java	Wed Jun 10 09:56:33 2020 +0100
@@ -829,7 +829,7 @@
      * 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