Modernize collection allocation
[netconf.git] / netconf / messagebus-netconf / src / main / java / org / opendaylight / netconf / messagebus / eventsources / netconf / NetconfEventSource.java
index 0d84d9a89a51252612b939f987f15c5b7c05bf2f..849c0de8d86af4f08e9042f7d5739825639d1e82 100644 (file)
@@ -220,8 +220,7 @@ public class NetconfEventSource implements EventSource, DOMNotificationListener
         final String namespace = notification.getType().getLastComponent().getNamespace().toString();
         for (NotificationTopicRegistration notifReg : notificationTopicRegistrations.get(namespace)) {
             notifReg.setLastEventTime(notificationEventTime);
-            Set<TopicId> topicIdsForNotification = notifReg.getTopicsForNotification(notificationPath);
-            for (TopicId topicId : topicIdsForNotification) {
+            for (TopicId topicId : notifReg.getTopicsForNotification(notificationPath)) {
                 publishNotification(notification, topicId);
                 LOG.debug("Notification {} has been published for TopicId {}", notification.getType(),
                         topicId.getValue());