mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
fix backwards logic in Collections.toArray
This commit is contained in:
parent
1bca2e9e5d
commit
3e7acd7861
@ -16,7 +16,7 @@ public class Collections {
|
||||
static <T> T[] toArray(Collection collection, T[] array) {
|
||||
Class c = array.getClass().getComponentType();
|
||||
|
||||
if (array.length > collection.size()) {
|
||||
if (array.length < collection.size()) {
|
||||
array = (T[]) java.lang.reflect.Array.newInstance(c, collection.size());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user