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 1101af8442e656d749acd379bdda0b298058685c..4a2ab9936f5e4327c7d6eeb35df10416b2ee807f 100644 (file)
@@ -195,11 +195,6 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
 
     @Override
     public void handleCommand(Object message) {
 
     @Override
     public void handleCommand(Object message) {
-        boolean handled = snapshotSupport.handleSnapshotMessage(message);
-        if(handled) {
-            return;
-        }
-
         if (message instanceof ApplyState){
             ApplyState applyState = (ApplyState) message;
 
         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 if(message instanceof GetOnDemandRaftState) {
             onGetOnDemandRaftStats();
-        } else {
+        } else if(!snapshotSupport.handleSnapshotMessage(message)) {
             reusableBehaviorStateHolder.init(getCurrentBehavior());
 
             setCurrentBehavior(currentBehavior.handleMessage(getSender(), message));
             reusableBehaviorStateHolder.init(getCurrentBehavior());
 
             setCurrentBehavior(currentBehavior.handleMessage(getSender(), message));