Clean up DOMNotificationRouter.NO_LISTENERS 76/109176/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Dec 2023 16:39:24 +0000 (17:39 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Dec 2023 16:55:09 +0000 (17:55 +0100)
Use Futures.immediateFuture() with Empty.value() to reduce reliance on
FluentFuture and null values.

Change-Id: I8233a4227e38753531994c13feb9e580c03f66d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
dom/mdsal-dom-broker/src/main/java/org/opendaylight/mdsal/dom/broker/DOMNotificationRouter.java

index 42987a518468e9b7d7e443fb211a7cbce4b2858a..bee565a48a94dd0dc26736ab3e4c9bab07e1e464 100644 (file)
@@ -41,8 +41,8 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.util.ListenerRegistry;
 import org.opendaylight.yangtools.util.concurrent.EqualityQueuedNotificationManager;
-import org.opendaylight.yangtools.util.concurrent.FluentFutures;
 import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager;
+import org.opendaylight.yangtools.yang.common.Empty;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
@@ -105,7 +105,7 @@ public class DOMNotificationRouter implements AutoCloseable, DOMNotificationPubl
     }
 
     private static final Logger LOG = LoggerFactory.getLogger(DOMNotificationRouter.class);
-    private static final @NonNull ListenableFuture<Void> NO_LISTENERS = FluentFutures.immediateNullFluentFuture();
+    private static final @NonNull ListenableFuture<?> NO_LISTENERS = Futures.immediateFuture(Empty.value());
 
     private final ListenerRegistry<DOMNotificationSubscriptionListener> subscriptionListeners =
             ListenerRegistry.create();