On Mon, Nov 16, 2009 at 1:10 PM, Jörg Schaible <joerg.schai...@gmx.de> wrote: > Hi Hen, > > Henri Yandell wrote at Samstag, 14. November 2009 10:32: > >> Wrapping 5 ArrayUtils issues up in one email to see if we can make >> decisions on them. >> >> LANG-470 Add containsAll(Object[], Object[]) methods to ArrayUtils >> LANG-531 Add defaultIfEmpty or nullIfEmpty to ArrayUtils >> LANG-536 Add isSorted() to ArrayUtils >> LANG-537 Add ArrayUtils.toArray to create generic arrays >> LANG-534 ArrayUtils should have method to convert null arrays to >> empty ones to help with Defensive coding >> >> Going through each: >> > [snip] >> >> LANG-537. >> I don't get this one. Presumably I'm missing something. > > Have a look at the javadoc for this. In short: You cannot create an array > for a generic type with > > T array[] = new T[]{a,b,c}; > > However, this can be done with: > > T array[] = ArrayUtils.toArray(a,b,c); >
Ahh. Seems useful then :) I'll see if the javadoc maybe needs more example wise for dozy sods like me. Hen --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org