8043329: Wrong variable used in java.util.Collections javadoc code
Reviewed-by: lancea, rriggs
Contributed-by: merkel05@gmail.com
--- 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());
* }