If you want to remove all elements from a collection c, use c.clear, not c.removeAll(c).