Annotate DOMNotificationService returns 19/101619/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jun 2022 10:30:40 +0000 (12:30 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jun 2022 10:31:09 +0000 (12:31 +0200)
We guarantee a non-null return, annotate that.

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

index fd6891671c38158bebd12819fc1079ae8ccb3935..7d0bd53859c4d6c280929761fdfb0e2bfe171756 100644 (file)
@@ -31,7 +31,7 @@ public interface DOMNotificationService extends DOMService {
      *         null or a schema node identifier which does not represent a valid {@link DOMNotification} type.
      * @throws NullPointerException if either of the arguments is null
      */
-    <T extends DOMNotificationListener> ListenerRegistration<T>
+    <T extends DOMNotificationListener> @NonNull ListenerRegistration<T>
             registerNotificationListener(@NonNull T listener, @NonNull Collection<Absolute> types);
 
     /**
@@ -48,7 +48,7 @@ public interface DOMNotificationService extends DOMService {
      *         null or a schema node identifier which does not represent a valid {@link DOMNotification} type.
      * @throws NullPointerException if listener is null
      */
-    default <T extends DOMNotificationListener> ListenerRegistration<T>
+    default <T extends DOMNotificationListener> @NonNull ListenerRegistration<T>
             registerNotificationListener(@NonNull final T listener, final Absolute... types) {
         return registerNotificationListener(listener, Arrays.asList(types));
     }