Action should not be @NonNullByDefault 88/73988/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 12 Jul 2018 16:21:50 +0000 (18:21 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 12 Jul 2018 16:27:40 +0000 (18:27 +0200)
Since the codegen does not have the concept of annotation use,
hence we cannot use @NonNullByDefault and generate appropriate
annotations in generated code.

Change-Id: Iacb441208484609e7551ba55de37154a40061424
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/Action.java

index 861101d54a83d943e5391e8dedac6be324aa4105..0b60c9c835ccf29129605b274ddfcc7a4014b746 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.yangtools.yang.binding;
 import com.google.common.annotations.Beta;
 import com.google.common.util.concurrent.FluentFuture;
 import javax.annotation.CheckReturnValue;
-import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 /**
@@ -20,7 +20,6 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
  */
 @Beta
 @FunctionalInterface
-@NonNullByDefault
 public interface Action<P extends DataObject, I extends RpcInput, O extends RpcOutput> {
     /**
      * Invoke the action.
@@ -31,5 +30,5 @@ public interface Action<P extends DataObject, I extends RpcInput, O extends RpcO
      * @throws NullPointerException if any of the arguments are null
      */
     @CheckReturnValue
-    FluentFuture<RpcResult<O>> invoke(InstanceIdentifier<P> path, I input);
+    @NonNull FluentFuture<@NonNull RpcResult<@NonNull O>> invoke(@NonNull InstanceIdentifier<P> path, @NonNull I input);
 }