Skip to content

Commit 63805cf

Browse files
committed
ArrayUtils: use ObjectArray instead of ArrayList
The ObjectArray is superior in many respects, so let's use it.
1 parent 7538b25 commit 63805cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/scijava/util/ArrayUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
package org.scijava.util;
3333

34-
import java.util.ArrayList;
3534
import java.util.Collection;
3635
import java.util.List;
3736

@@ -87,7 +86,7 @@ public static Collection<?> toCollection(final Object value) {
8786
}
8887
// This object is neither an array nor a collection.
8988
// So we wrap it in a list and return.
90-
final List<Object> list = new ArrayList<Object>();
89+
final List<Object> list = new ObjectArray<Object>(Object.class);
9190
list.add(value);
9291
return list;
9392
}

0 commit comments

Comments
 (0)