package org.opendaylight.netconf.topology.singleton.messages.rpc;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.Serializable;
import java.util.Collection;
import java.util.LinkedList;
+import java.util.Objects;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
import org.opendaylight.yangtools.yang.common.RpcError;
public class InvokeRpcMessageReply implements Serializable {
private static final long serialVersionUID = 1L;
+ @SuppressFBWarnings("SE_BAD_FIELD")
private final Collection<RpcError> rpcErrors;
private final NormalizedNodeMessage normalizedNodeMessage;
- public InvokeRpcMessageReply(final NormalizedNodeMessage normalizedNodeMessage,
- final Collection<RpcError> rpcErrors) {
+ public InvokeRpcMessageReply(@Nullable final NormalizedNodeMessage normalizedNodeMessage,
+ @Nonnull final Collection<RpcError> rpcErrors) {
this.normalizedNodeMessage = normalizedNodeMessage;
- this.rpcErrors = rpcErrors;
+ this.rpcErrors = Objects.requireNonNull(rpcErrors);
}
+ @Nullable
public NormalizedNodeMessage getNormalizedNodeMessage() {
return normalizedNodeMessage;
}
+ @Nonnull
public Collection<RpcError> getRpcErrors() {
return rpcErrors;
}
private InvokeRpcMessageReply invokeRpcMessageReply;
- Proxy() {
+ @SuppressWarnings("checkstyle:RedundantModifier")
+ public Proxy() {
//due to Externalizable
}