28 Oct
2010
28 Oct
'10
9:59 a.m.
Le Thu, 28 Oct 2010 11:54:34 +0200 (CEST), bpoussin@users.nuiton.org a écrit :
if (args == null) { + args = new String[0]; + } Vaut mieux éviter des allocation de tableaux vide.
Mieux vaut utiliser une constante : public static final String[] EMPTY_STRING_ARRAY = new String[0]; puis args = EMPTY_STRING_ARRAY; Cà évite des allocations mémoire pour rien ;) -- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 email: chemit@codelutin.com http://www.codelutin.com