static void migrateList(Collection a, Collection b) { if (b != null && a != null) { b.addAll(a); a.clear(); } }