ImiServerAvatar serverAvatar = serverAvatars.get(avatarName);
if (serverAvatar != null) {
ContentResource resource = serverAvatar.resource;
ContentCollection parent = resource.getParent();
try {
parent.removeChild(resource.getName());
} catch (ContentRepositoryException excp) {
logger.log(Level.WARNING, "Unable to delete avatar from" +
" server " + avatar, excp);
}
serverAvatars.remove(avatarName);