mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
fix backwards logic in Collections.toArray
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user