Fix missing NetconfNotificationCollector service 38/31138/1
authorTomas Cere <tcere@cisco.com>
Thu, 10 Dec 2015 13:09:47 +0000 (14:09 +0100)
committerTomas Cere <tcere@cisco.com>
Thu, 10 Dec 2015 13:09:47 +0000 (14:09 +0100)
Change-Id: Icac4957a2e68499cc2a438e4ea3b516d725a4854
Signed-off-by: Tomas Cere <tcere@cisco.com>
opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/netconf/impl/osgi/NetconfImplActivator.java

index e62089601b0ffc15026c3d17facb3a8ebafbb1f2..7512f2616b4eac6c44a905d2ea9b10c3a9703071 100644 (file)
@@ -72,7 +72,7 @@ public class NetconfImplActivator implements BundleActivator {
                     new ServiceTracker<>(context, NetconfNotificationCollector.class, new ServiceTrackerCustomizer<NetconfNotificationCollector, NetconfNotificationCollector>() {
                         @Override
                         public NetconfNotificationCollector addingService(ServiceReference<NetconfNotificationCollector> reference) {
-                            Preconditions.checkState(listenerReg != null, "Notification collector service was already added");
+                            Preconditions.checkState(listenerReg == null, "Notification collector service was already added");
                             listenerReg = context.getService(reference).registerBaseNotificationPublisher();
                             monitoringService.setNotificationPublisher(listenerReg);
                             return null;