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 752aaa4 commit 84cfe34Copy full SHA for 84cfe34
src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -559,9 +559,7 @@ public Object[] toArray() {
559
public <T> T[] toArray(final T[] arr) {
560
// special implementation to handle disappearing values
561
final List<V> list = new ArrayList<>(size());
562
- for (final V value : this) {
563
- list.add(value);
564
- }
+ forEach(list::add);
565
return list.toArray(arr);
566
}
567
0 commit comments