Skip to content

Commit

Permalink
minor correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergii Yemets committed Feb 19, 2015
1 parent ba90d92 commit 88efb30
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ public List<TopicDto> findVacantTopicsByEndpointGroupId(String endpointGroupId)
public List<UpdateNotificationDto> removeTopicById(String id) { public List<UpdateNotificationDto> removeTopicById(String id) {
validateId(id, "Can't remove topic. Invalid topic id " + id); validateId(id, "Can't remove topic. Invalid topic id " + id);
TopicDto topic = findTopicById(id); TopicDto topic = findTopicById(id);
List<UpdateNotificationDto> updateNotificationDtos = new LinkedList<>(); List<UpdateNotificationDto> notificationList = new LinkedList<>();
if (topic != null) { if (topic != null) {
List<EndpointGroup> groups = endpointGroupDao.findEndpointGroupsByTopicIdAndAppId(topic.getApplicationId(), id); List<EndpointGroup> groups = endpointGroupDao.findEndpointGroupsByTopicIdAndAppId(topic.getApplicationId(), id);
if (groups != null && !groups.isEmpty()) { if (groups != null && !groups.isEmpty()) {
for (EndpointGroup eg : groups) { for (EndpointGroup eg : groups) {
updateNotificationDtos.add(endpointService.removeTopicFromEndpointGroup(eg.getId().toString(), id)); notificationList.add(endpointService.removeTopicFromEndpointGroup(eg.getId().toString(), id));
} }
} }
topicDao.removeById(id); topicDao.removeById(id);
notificationDao.removeNotificationsByTopicId(id); notificationDao.removeNotificationsByTopicId(id);
} }
return updateNotificationDtos; return notificationList;
} }


@Override @Override
Expand Down

0 comments on commit 88efb30

Please sign in to comment.