8043329: Wrong variable used in java.util.Collections javadoc code

Reviewed-by: lancea, rriggs
This commit is contained in:
Sergey Ustimenko 2016-03-10 09:35:59 -05:00 committed by Roger Riggs
parent 020a27b202
commit f36012af70

View File

@ -2728,7 +2728,7 @@ public class Collections {
* Set s2 = m2.keySet(); // Needn't be in synchronized block * Set s2 = m2.keySet(); // Needn't be in synchronized block
* ... * ...
* synchronized (m) { // Synchronizing on m, not m2 or s2! * 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()) * while (i.hasNext())
* foo(i.next()); * foo(i.next());
* } * }