changeset 4110 | ac033ba6ede4 |
parent 2 | 90ce3da70b43 |
child 5506 | 202f599c92aa |
--- a/jdk/src/share/classes/java/util/AbstractQueue.java Fri Oct 30 10:54:50 2009 -0700 +++ b/jdk/src/share/classes/java/util/AbstractQueue.java Mon Nov 02 17:25:38 2009 -0800 @@ -183,11 +183,9 @@ if (c == this) throw new IllegalArgumentException(); boolean modified = false; - Iterator<? extends E> e = c.iterator(); - while (e.hasNext()) { - if (add(e.next())) + for (E e : c) + if (add(e)) modified = true; - } return modified; }