private static NotificationServerSync deepCopy(NotificationServerSync source) { if (source == null) { return null; } NotificationServerSync copy = new NotificationServerSync(); copy.setResponseStatus(source.getResponseStatus()); if (source.getNotifications() != null) { copy.setNotifications(new ArrayList<>(source.getNotifications())); } if (source.getAvailableTopics() != null) { copy.setAvailableTopics(new ArrayList<>(source.getAvailableTopics())); } return copy; }
notificationResponse.setNotifications(notifications); notificationResponse.setResponseStatus(SyncResponseStatus.DELTA); LOG.debug("Updated sync response {}", response);
notifications.add(convertNotification(notificationDto)); response.setNotifications(notifications);