static ArrayList cloneList(Collection l) { if (l == null) ret new L; // TODO: is this correct when l is a keySet? synchronized(l) { ret new ArrayList(l); } }