@Override public void notifySuccess(ResourceOperationDescription successDescription, Task task, OperationResult parentResult) { Validate.notNull(successDescription, "Operation description of resource object shadow must not be null."); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Resource operation success notification\n{} ", successDescription.debugDump()); } successDescription.checkConsistence(); if ((null != operationListeners) && (!operationListeners.isEmpty())) { for (ResourceOperationListener listener : new ArrayList<>(operationListeners)) { // sometimes there is registration/deregistration from within //LOGGER.trace("Listener: {}", listener.getClass().getSimpleName()); try { listener.notifySuccess(successDescription, task, parentResult); } catch (RuntimeException e) { LOGGER.error("Exception {} thrown by operation success listener {}: {}-{}", new Object[]{ e.getClass(), listener.getName(), e.getMessage(), e }); parentResult.createSubresult(CLASS_NAME_WITH_DOT + "notifySuccess") .recordWarning("Operation success listener has thrown unexpected exception", e); } } } else { LOGGER.debug("Operation success received but listener list is empty, there is nobody to get the message"); } }