mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-06 01:58:24 +00:00
Revert "Allocate array of the correct size"
This reverts commit 60b32953a968e5623f82a6b27d6c679bc17c48e5. Following the advices from http://shipilev.net/blog/2016/arrays-wisdom-ancients/ this seems to be faster and safer on current VMs.
This commit is contained in:
parent
e01b8eb3fe
commit
8bb3526317
@ -346,7 +346,7 @@ static String[] toNoNullStringArray(final Object[] array) {
|
||||
list.add(e.toString());
|
||||
}
|
||||
}
|
||||
return list.toArray(new String[list.size()]);
|
||||
return list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user