Address comment in gerrit 17266 37/18137/6
authorTom Pantelis <tpanteli@brocade.com>
Fri, 10 Apr 2015 21:08:06 +0000 (17:08 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 14 Apr 2015 00:56:08 +0000 (20:56 -0400)
As per comment in https://git.opendaylight.org/gerrit/#/c/17266/ , moved
check for snapshot messages to the else clause.

Change-Id: I84405dfb6c832058a1bcc041a539748f4499dd8f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java

index 1101af8..4a2ab99 100644 (file)
@@ -195,11 +195,6 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
 
     @Override
     public void handleCommand(Object message) {
-        boolean handled = snapshotSupport.handleSnapshotMessage(message);
-        if(handled) {
-            return;
-        }
-
         if (message instanceof ApplyState){
             ApplyState applyState = (ApplyState) message;
 
@@ -233,7 +228,7 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
             );
         } else if(message instanceof GetOnDemandRaftState) {
             onGetOnDemandRaftStats();
-        } else {
+        } else if(!snapshotSupport.handleSnapshotMessage(message)) {
             reusableBehaviorStateHolder.init(getCurrentBehavior());
 
             setCurrentBehavior(currentBehavior.handleMessage(getSender(), message));

©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.