8043329: Wrong variable used in java.util.Collections javadoc code
authorrriggs
Thu, 10 Mar 2016 09:35:59 -0500
changeset 36436 c538d4a57e10
parent 36435 0408881ad616
child 36437 16ef746c2a7b
8043329: Wrong variable used in java.util.Collections javadoc code Reviewed-by: lancea, rriggs Contributed-by: merkel05@gmail.com
jdk/src/java.base/share/classes/java/util/Collections.java
--- a/jdk/src/java.base/share/classes/java/util/Collections.java	Wed Mar 09 21:17:06 2016 +0100
+++ b/jdk/src/java.base/share/classes/java/util/Collections.java	Thu Mar 10 09:35:59 2016 -0500
@@ -2728,7 +2728,7 @@
      *  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());
      *  }