In order convert a List to an array, you need an empty array like following:
List<Foo> fooList;
Foo[] foos = fooList.toArray(new Foo[0]);
I happen to use this code snippet a lot, so instead of creating an empty array every time, I decided to create a static empty array, and use it each time. e.g.
private static Foo[] EMPTY_FOOS = new Foo[0];
List<Foo> fooList;
Foo[] foos = fooList.toArray(EMPTY_FOOS);
Is this worth it or are we looking at a difference of 0.000000000000000000000000000000000000000000000000000001ms?