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:
parent
e01b8eb3fe
commit
8bb3526317
|
@ -346,7 +346,7 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
|
||||||
list.add(e.toString());
|
list.add(e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue