We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de4b7f8 commit 752aaa4Copy full SHA for 752aaa4
src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -430,9 +430,7 @@ public Object[] toArray() {
430
public <T> T[] toArray(final T[] arr) {
431
// special implementation to handle disappearing keys
432
final List<K> list = new ArrayList<>(size());
433
- for (final K key : this) {
434
- list.add(key);
435
- }
+ forEach(list::add);
436
return list.toArray(arr);
437
}
438
0 commit comments