Fix various warnings
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / restconf / restful / utils / CreateStreamUtil.java
index 10955e792906dbaff4b5caa45308f213fa969225..c358b42bda523e374bf7ddbfb56a327bb0a88087 100644 (file)
@@ -221,12 +221,12 @@ public final class CreateStreamUtil {
             streamName = streamName + "/JSON";
         }
 
-        if (!Notificator.existNotificationListenerFor(streamName)) {
-            return Notificator.createNotificationListener(paths, streamName, outputType);
-        } else {
+        if (Notificator.existNotificationListenerFor(streamName)) {
             final List<NotificationListenerAdapter> notificationListenerFor =
                     Notificator.getNotificationListenerFor(streamName);
             return SubscribeToStreamUtil.pickSpecificListenerByOutput(notificationListenerFor, outputType);
         }
+
+        return Notificator.createNotificationListener(paths, streamName, outputType);
     }
 }