This example combines both of them.
public void setPhones(List<PhoneNumber> phones) throws Exception
{
    this.phones = phones;
    this.phones.clear();
    this.phones.addAll(phones);
}Those funny java snippets from real code
public void setPhones(List<PhoneNumber> phones) throws Exception
{
    this.phones = phones;
    this.phones.clear();
    this.phones.addAll(phones);
}