static void syncClear(Collection c) { if (c != null) synchronized(c) { c.clear(); } }