Closed GoogleCodeExporter closed 9 years ago
This won't work and is generally a very bad practice. Sun made a big mistake by
supporting that functionality!
Use buttons.toArray(new String[buttons.size()]);
This is a horrible thing to support because what you are essentially doing is:
Allocating a redundant array which is immediately discarded.
Using reflection to detect the array type.
Using reflection to allocate a new Array.
All of that HUGE overhead can be avoided by one call to the size method...
Original comment by shai.almog
on 12 Jan 2015 at 6:49
Original issue reported on code.google.com by
mwarn...@readerware.com
on 12 Jan 2015 at 1:11