Avoid calling twice update() in setAttendees().
Move the update() call after the clearAttendees() since the later also call update() internally. Calling twice update() is emitting a warning if the incidence is stored by a memory calendar.
Move the update() call after the clearAttendees() since the later also call update() internally. Calling twice update() is emitting a warning if the incidence is stored by a memory calendar.