protected <T extends CoiDisclosureAttachment> boolean deleteExistingAttachment( final int index, final List<T> attachments) { if (!CollectionUtils.validIndexForList(index, attachments)) { return false; } CoiDisclosureAttachment attachment = attachments.get(index); attachments.remove(attachment); return true; }