Quick question because I'm lazy:
If you have a method
void doSomething(T... args) { ...
and invoke it with
doSomething(null);
how does the compiler interpret it? As a null array, or a one-element array with a value of null?
The first would seem more consistent, because then
void doSomething(T... args) { ...
and
void doSomething(int... args) { ...
could be handled the same way; but it would seem to preclude
doSomething(null, null);
for the first case, unless it deals with
two or more nulls differently.
I can't find anything explicit in the JLS (or maybe I'm just looking in the wrong place), so I was wondering if anyone had the answer at their fingertips.
As I say: just lazy. I will
test if I have to.
Winston