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; }
response.setAvailableTopics(topicList);