Enforce non-null entries field in AppendEntries 52/59052/2
authorTom Pantelis <tompantelis@gmail.com>
Fri, 16 Jun 2017 03:13:06 +0000 (23:13 -0400)
committerRobert Varga <nite@hq.sk>
Mon, 19 Jun 2017 07:48:54 +0000 (07:48 +0000)
commitd806210832a39d23be77d31d8528775928ca7504
treedd317c0730e12cc1dad249d4c9d436ab3d66e7c8
parent35c14cd8724ba5fb141eec03f57074a3335b4e35
Enforce non-null entries field in AppendEntries

The List<ReplicatedLogEntry> entries field has to be non-null
so enforce it with PreCondition. Same with leaderId. Callers
of getEntries do not need to check for null.

Change-Id: I5cd404d54e453e43456952ea2e11ea7f8f1c626c
Signed-off-by: Tcm Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Follower.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntries.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractRaftActorBehaviorTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.