Revert "Allocate array of the correct size"

This reverts commit 60b32953a9.

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:
Benedikt Ritter 2016-01-19 08:07:51 +01:00
parent e01b8eb3fe
commit 8bb3526317
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
list.add(e.toString());
}
}
return list.toArray(new String[list.size()]);
return list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
}