From f36012af70c61446189a22c28dd8dadcf5af4363 Mon Sep 17 00:00:00 2001 From: Sergey Ustimenko Date: Thu, 10 Mar 2016 09:35:59 -0500 Subject: [PATCH] 8043329: Wrong variable used in java.util.Collections javadoc code Reviewed-by: lancea, rriggs --- jdk/src/java.base/share/classes/java/util/Collections.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/classes/java/util/Collections.java b/jdk/src/java.base/share/classes/java/util/Collections.java index 73047bff5d1..0eb9da0f644 100644 --- a/jdk/src/java.base/share/classes/java/util/Collections.java +++ b/jdk/src/java.base/share/classes/java/util/Collections.java @@ -2728,7 +2728,7 @@ public class Collections { * Set s2 = m2.keySet(); // Needn't be in synchronized block * ... * synchronized (m) { // Synchronizing on m, not m2 or s2! - * Iterator i = s.iterator(); // Must be in synchronized block + * Iterator i = s2.iterator(); // Must be in synchronized block * while (i.hasNext()) * foo(i.next()); * }